@dongkboy 1 year ago
parent
commit
3642f19912
100 changed files with 5885 additions and 409 deletions
  1. 143 137
      components/common/address.vue
  2. 14 2
      components/modules/index/index-nav.vue
  3. 9 8
      config/baseUrl.js
  4. 1 43
      main.js
  5. 223 217
      manifest.json
  6. 28 0
      node_modules/base64-arraybuffer/CHANGELOG.md
  7. 22 0
      node_modules/base64-arraybuffer/LICENSE
  8. 27 0
      node_modules/base64-arraybuffer/README.md
  9. 50 0
      node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
  10. 0 0
      node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js.map
  11. 61 0
      node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js
  12. 0 0
      node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js.map
  13. 48 0
      node_modules/base64-arraybuffer/dist/lib/index.js
  14. 0 0
      node_modules/base64-arraybuffer/dist/lib/index.js.map
  15. 2 0
      node_modules/base64-arraybuffer/dist/types/index.d.ts
  16. 79 0
      node_modules/base64-arraybuffer/package.json
  17. 0 0
      node_modules/base64-arraybuffer/rollup.config.ts
  18. 27 0
      node_modules/camelcase/index.js
  19. 21 0
      node_modules/camelcase/license
  20. 70 0
      node_modules/camelcase/package.json
  21. 56 0
      node_modules/camelcase/readme.md
  22. 0 0
      node_modules/html2canvas/node_modules/css-line-break/CHANGELOG.md
  23. 0 0
      node_modules/html2canvas/node_modules/css-line-break/LICENSE
  24. 0 0
      node_modules/html2canvas/node_modules/css-line-break/README.md
  25. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.es5.js
  26. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.es5.js.map
  27. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.umd.js
  28. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.umd.js.map
  29. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/LineBreak.js
  30. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/LineBreak.js.map
  31. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/Util.js
  32. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/Util.js.map
  33. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/index.js
  34. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/index.js.map
  35. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/linebreak-trie.js
  36. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/lib/linebreak-trie.js.map
  37. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/types/LineBreak.d.ts
  38. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/types/Util.d.ts
  39. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/types/index.d.ts
  40. 0 0
      node_modules/html2canvas/node_modules/css-line-break/dist/types/linebreak-trie.d.ts
  41. 2 2
      node_modules/html2canvas/node_modules/css-line-break/package.json
  42. 40 0
      node_modules/html2canvas/node_modules/css-line-break/rollup.config.ts
  43. 43 0
      node_modules/text-segmentation/CHANGELOG.md
  44. 22 0
      node_modules/text-segmentation/LICENSE
  45. 27 0
      node_modules/text-segmentation/README.md
  46. 218 0
      node_modules/text-segmentation/dist/lib/GraphemeBreak.js
  47. 0 0
      node_modules/text-segmentation/dist/lib/GraphemeBreak.js.map
  48. 3 0
      node_modules/text-segmentation/dist/lib/grapheme-break-trie.js
  49. 1 0
      node_modules/text-segmentation/dist/lib/grapheme-break-trie.js.map
  50. 9 0
      node_modules/text-segmentation/dist/lib/index.js
  51. 1 0
      node_modules/text-segmentation/dist/lib/index.js.map
  52. 5 0
      node_modules/text-segmentation/dist/text-segmentation.es5.js
  53. 0 0
      node_modules/text-segmentation/dist/text-segmentation.es5.js.map
  54. 11 0
      node_modules/text-segmentation/dist/text-segmentation.umd.js
  55. 0 0
      node_modules/text-segmentation/dist/text-segmentation.umd.js.map
  56. 21 0
      node_modules/text-segmentation/dist/types/GraphemeBreak.d.ts
  57. 0 0
      node_modules/text-segmentation/dist/types/grapheme-break-trie.d.ts
  58. 1 0
      node_modules/text-segmentation/dist/types/index.d.ts
  59. 80 0
      node_modules/text-segmentation/package.json
  60. 40 0
      node_modules/text-segmentation/rollup.config.ts
  61. 21 0
      node_modules/uppercamelcase/LICENSE
  62. 52 0
      node_modules/uppercamelcase/README.md
  63. 7 0
      node_modules/uppercamelcase/index.js
  64. 63 0
      node_modules/uppercamelcase/package.json
  65. 32 0
      node_modules/utrie/CHANGELOG.md
  66. 22 0
      node_modules/utrie/LICENSE
  67. 143 0
      node_modules/utrie/dist/lib/Trie.js
  68. 0 0
      node_modules/utrie/dist/lib/Trie.js.map
  69. 888 0
      node_modules/utrie/dist/lib/TrieBuilder.js
  70. 0 0
      node_modules/utrie/dist/lib/TrieBuilder.js.map
  71. 54 0
      node_modules/utrie/dist/lib/Util.js
  72. 0 0
      node_modules/utrie/dist/lib/Util.js.map
  73. 10 0
      node_modules/utrie/dist/lib/index.js
  74. 1 0
      node_modules/utrie/dist/lib/index.js.map
  75. 76 0
      node_modules/utrie/dist/types/Trie.d.ts
  76. 65 0
      node_modules/utrie/dist/types/TrieBuilder.d.ts
  77. 3 0
      node_modules/utrie/dist/types/Util.d.ts
  78. 2 0
      node_modules/utrie/dist/types/index.d.ts
  79. 1101 0
      node_modules/utrie/dist/utrie.es5.js
  80. 0 0
      node_modules/utrie/dist/utrie.es5.js.map
  81. 1114 0
      node_modules/utrie/dist/utrie.umd.js
  82. 0 0
      node_modules/utrie/dist/utrie.umd.js.map
  83. 79 0
      node_modules/utrie/package.json
  84. 40 0
      node_modules/utrie/rollup.config.ts
  85. 0 0
      node_modules/vue-amap/CHANGELOG.md
  86. 21 0
      node_modules/vue-amap/LICENSE
  87. 156 0
      node_modules/vue-amap/README.md
  88. 0 0
      node_modules/vue-amap/dist/index.js
  89. 0 0
      node_modules/vue-amap/dist/index.js.map
  90. 142 0
      node_modules/vue-amap/package.json
  91. 0 0
      node_modules/vue-amap/src/docs/.nojekyll
  92. 25 0
      node_modules/vue-amap/src/docs/README.md
  93. 13 0
      node_modules/vue-amap/src/docs/_coverpage.md
  94. 50 0
      node_modules/vue-amap/src/docs/_sidebar.md
  95. BIN
      node_modules/vue-amap/src/docs/assets/images/logo.ico
  96. BIN
      node_modules/vue-amap/src/docs/assets/images/logo.png
  97. 102 0
      node_modules/vue-amap/src/docs/index.html
  98. BIN
      node_modules/vue-amap/src/docs/logo.ico
  99. 37 0
      node_modules/vue-amap/src/docs/zh-cn/_sidebar.md
  100. 161 0
      node_modules/vue-amap/src/docs/zh-cn/base/amap.md

+ 143 - 137
components/common/address.vue

@@ -2,24 +2,20 @@
 	<view>
 		<view class="addres_select_val">
 			<view>
-				<view v-for="(item, index) of addressVal" :key="index" :class="{ select: addressIndex == index }" @click="selectType(index)" k>{{ item.name }}</view>
-				<view
-					:class="{ 'select main-text-color main-border-color': selectState == addressIndex }"
+				<view v-for="(item, index) of addressVal" :key="index" :class="{ select: addressIndex == index }"
+					@click="selectType(index)">{{ item.name }}</view>
+				<view :class="{ 'select main-text-color main-border-color': selectState == addressIndex }"
 					v-show="selectState < length || (selectState >= length && selectState < 3 && !force)"
-					@click="selectType(selectState)"
-				>
+					@click="selectType(selectState)">
 					请选择
 				</view>
 			</view>
 		</view>
 		<scroll-view class="addres_box" scroll-y :scroll-top="scrollTop">
 			<view>
-				<view
-					v-for="(item, index) of addressList"
-					:key="index"
+				<view v-for="(item, index) of addressList" :key="index"
 					:class="{ 'select main-text-color': addressVal.length > addressIndex && item.objId == addressVal[addressIndex].objId }"
-					@click="selectClick(item)"
-				>
+					@click="selectClick(item)">
 					{{ item.name }}
 				</view>
 			</view>
@@ -28,144 +24,154 @@
 </template>
 
 <script>
-export default {
-	props: {
-		//选中数据
-		dataList: {
-			type: Array,
-			default() {
-				return [];
+	export default {
+		props: {
+			//选中数据
+			dataList: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			//联动长度[省,市,区]
+			length: {
+				type: Number,
+				default () {
+					return 3;
+				}
+			},
+			//是否强制选择,如果length=2,force = false 选择到市的时候就可以确定了,但是还可以选择到区
+			force: {
+				type: Boolean,
+				default () {
+					return true;
+				}
 			}
 		},
-		//联动长度[省,市,区]
-		length: {
-			type: Number,
-			default() {
-				return 3;
+		created() {
+			if (this.dataList instanceof Array) {
+				this.addressVal = this.dataList;
+				this.selectState = this.dataList.length;
 			}
 		},
-		//是否强制选择,如果length=2,force = false 选择到市的时候就可以确定了,但是还可以选择到区
-		force: {
-			type: Boolean,
-			default() {
-				return true;
+		watch: {
+			dataList(val) {
+				this.addressVal = val;
+				this.selectState = val.length;
 			}
-		}
-	},
-	created() {
-		if (this.dataList instanceof Array) {
-			this.addressVal = this.dataList;
-			this.selectState = this.dataList.length;
-		}
-	},
-	watch: {
-		dataList(val) {
-			this.addressVal = val;
-			this.selectState = val.length;
-		}
-	},
-	data() {
-		return {
-			//选出的值
-			addressVal: [],
-			//当前选择
-			addressIndex: 0,
-			//选择的值
-			addressList: [],
-			//请选择的显示
-			selectState: 0,
-			scrollTop:0
-		};
-	},
-	methods: {
-		getRegion(pid) {
-			//请求数据
-			this.$http.get('api/kemean/aid/region', { pid: pid }, { load: false }).then(data => {
-				if (data.length > 0) {
-					this.addressList = data;
-					// this.$refs.scroll.scrollTop = '0px';
-					this.scrollTop = Math.random();
+		},
+		data() {
+			return {
+				//选出的值
+				addressVal: [],
+				//当前选择
+				addressIndex: 0,
+				//选择的值
+				addressList: [],
+				//请选择的显示
+				selectState: 0,
+				scrollTop: 0
+			};
+		},
+		methods: {
+			getRegion(pid) {
+				//请求数据
+				this.$http.get('api/kemean/aid/region', {
+					pid: pid
+				}, {
+					load: false
+				}).then(data => {
+					if (data.length > 0) {
+						this.addressList = data;
+						// this.$refs.scroll.scrollTop = '0px';
+						this.scrollTop = Math.random();
+					} else {
+						this.$emit('change', this.addressVal);
+					}
+				});
+			},
+			//切换对应的类型
+			selectType(index) {
+				this.addressIndex = index;
+				var len = this.addressVal.length;
+				if (index == 0) {
+					this.getRegion(0);
 				} else {
+					this.getRegion(this.addressVal[index - 1].objId);
+				}
+				if (len == this.length) {
+					this.selectState = this.length;
+				} else if (len == this.length && index == this.length && this.force) {
+					this.selectState = index;
+				} else {
+					this.selectState = index + 1;
+				}
+			},
+			//选择
+			selectClick(item) {
+				if (this.addressIndex == 0) {
+					this.addressVal = [];
+				} else {
+					this.addressVal.splice(this.addressIndex, this.addressVal.length - 1);
+				}
+				this.addressVal.push(item);
+				if (this.addressVal.length < this.length || (this.addressVal.length < 3 && !this.force)) {
+					this.getRegion(item.objId);
+					this.addressIndex++;
+				}
+				if (this.addressVal.length >= this.length || !this.force) {
 					this.$emit('change', this.addressVal);
 				}
-			});
-		},
-		//切换对应的类型
-		selectType(index) {
-			this.addressIndex = index;
-			var len = this.addressVal.length;
-			if (index == 0) {
-				this.getRegion(0);
-			} else {
-				this.getRegion(this.addressVal[index - 1].objId);
-			}
-			if (len == this.length) {
-				this.selectState = this.length;
-			} else if (len == this.length && index == this.length && this.force) {
-				this.selectState = index;
-			} else {
-				this.selectState = index + 1;
+				this.selectState = this.addressVal.length;
 			}
 		},
-		//选择
-		selectClick(item) {
-			if (this.addressIndex == 0) {
-				this.addressVal = [];
-			} else {
-				this.addressVal.splice(this.addressIndex, this.addressVal.length - 1);
-			}
-			this.addressVal.push(item);
-			if (this.addressVal.length < this.length || (this.addressVal.length < 3 && !this.force)) {
-				this.getRegion(item.objId);
-				this.addressIndex++;
-			}
-			if (this.addressVal.length >= this.length || !this.force) {
-				this.$emit('change', this.addressVal);
-			}
-			this.selectState = this.addressVal.length;
+		mounted() {
+			this.getRegion(0);
 		}
-	},
-	mounted() {
-		this.getRegion(0);
-	}
-};
+	};
 </script>
 
 <style scoped>
-.addres_select_val {
-	padding: 0upx 10upx;
-	border-bottom: 1upx solid #ebebeb;
-	box-sizing: border-box;
-	background-color: #fff;
-}
-.addres_select_val > view {
-	display: flex;
-	flex-wrap: wrap;
-}
-.addres_select_val > view > view {
-	margin-left: 20upx;
-	padding: 0upx 10upx;
-	height: 72upx;
-	line-height: 72upx;
-	border-bottom: 2upx solid #fff;
-	box-sizing: border-box;
-	font-size: 28upx;
-}
-.addres_select_val > view > view:first-child {
-	margin-left: 0upx;
-}
-.addres_select_val > view > view.select {
-	border-bottom: 2upx solid;
-}
-.addres_box {
-	padding: 0upx 20upx;
-	height: 420upx;
-	overflow-y: auto;
-	background-color: #fff;
-}
-.addres_box view > view {
-	height: 72upx;
-	line-height: 72upx;
-	font-size: 28upx;
-}
-</style>
+	.addres_select_val {
+		padding: 0upx 10upx;
+		border-bottom: 1upx solid #ebebeb;
+		box-sizing: border-box;
+		background-color: #fff;
+	}
+
+	.addres_select_val>view {
+		display: flex;
+		flex-wrap: wrap;
+	}
+
+	.addres_select_val>view>view {
+		margin-left: 20upx;
+		padding: 0upx 10upx;
+		height: 72upx;
+		line-height: 72upx;
+		border-bottom: 2upx solid #fff;
+		box-sizing: border-box;
+		font-size: 28upx;
+	}
+
+	.addres_select_val>view>view:first-child {
+		margin-left: 0upx;
+	}
+
+	.addres_select_val>view>view.select {
+		border-bottom: 2upx solid;
+	}
+
+	.addres_box {
+		padding: 0upx 20upx;
+		height: 420upx;
+		overflow-y: auto;
+		background-color: #fff;
+	}
+
+	.addres_box view>view {
+		height: 72upx;
+		line-height: 72upx;
+		font-size: 28upx;
+	}
+</style>

+ 14 - 2
components/modules/index/index-nav.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
-		<swiper style="resistanceRatio : 0" class="swiper" :style="'height: '+currentPageHeight+'upx;'" duration="300"
-			@change="categoryChange">
+		<swiper style="resistanceRatio : 0" class="swiper" :style="'height: '+currentPageHeight+'upx;'"
+			:duration="duration" :interval="interval" :autoplay="autoplay" @change="categoryChange">
 			<swiper-item v-for="(page, pageindex) in categoryList" :key="pageindex">
 				<view class="category-list">
 					<view class="icon" v-for="category in page" :key="category.cat_id" @tap="tapEvent(category)">
@@ -35,6 +35,18 @@
 			row: {
 				type: Number,
 				default: 2
+			},
+			autoplay: { //自动轮播
+				type: Boolean,
+				default: true,
+			},
+			duration: { //切换时长
+				type: Number,
+				default: 500
+			},
+			interval: { //间隔时长
+				type: Number,
+				default: 5000
 			}
 		},
 		data() {

+ 9 - 8
config/baseUrl.js

@@ -3,20 +3,21 @@ let h5BaseUrl = "";
 let socketUrl = "";
 if (process.env.NODE_ENV === 'development') {
 	// 开发环境
-	// baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
-	// h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
+	baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
+	h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
 	// baseUrl = "http://192.168.0.253:8082";
 	// baseUrl = "http://192.168.0.115:8080"; //凯森
-	baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //正式
-	h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
+	// baseUrl = "http://192.168.1.101:8080"; //武
+	// baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //正式
+	// h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
 	socketUrl = "";
 } else if (process.env.NODE_ENV === 'production') {
 	// 生产环境
-	// baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
-	// h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
+	baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
+	h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
 	// baseUrl = "http://192.168.0.115:8080"; //凯森
-	baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //正式
-	h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
+	// baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //正式
+	// h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
 	socketUrl = "";
 }
 const courtConfig = {

+ 1 - 43
main.js

@@ -82,46 +82,4 @@ plus.nativeUI.toast = (function(str) {
 		})
 	}
 });
-// #endif
-//在main.js中配置
-// function sizeFun() {
-// 	// 宽屏字体大小适配
-// 	let n = 1920;
-// 	// 循环运算判断,共9次,最小屏幕192,最大屏幕3640,以下,n是当前预设屏幕宽,i是循环计算次数
-// 	for (let i = 0; i < 9; i++) {
-// 		// 如果当前屏幕宽就是设计稿屏幕(1920),就不进行缩放
-// 		if (uni.getSystemInfoSync().windowWidth == n) {
-// 			return 1;
-// 		}
-
-// 		// 如果当前屏幕宽小于1920
-// 		if (uni.getSystemInfoSync().windowWidth < n) {
-// 			// 那就进入循环,预设屏幕大小减去192,再判断当前屏幕是否大于1920-192
-// 			n -= 192;
-// 			// 如果当前屏幕大于预设屏幕,就赋值
-// 			if (uni.getSystemInfoSync().windowWidth > n) {
-// 				// i+1:因为i从零开始
-// 				// 10-i+1:因为要算出当前是倒数第几次循环
-// 				// 10-i+1/10:因为要取1以下的小数
-// 				return (10 - (i + 1)) / 10;
-// 			}
-// 		}
-
-// 		// 如果当前屏幕宽大于1920
-// 		if (uni.getSystemInfoSync().windowWidth > n) {
-// 			// 那就进入循环,预设屏幕大小加上192,再判断当前屏幕是否大于1920+192
-// 			n += 192;
-// 			// 如果当前屏幕小于预设屏幕,就赋值
-// 			if (uni.getSystemInfoSync().windowWidth < n) {
-// 				// i+1:因为i从零开始
-// 				//(i+1)/10:因为要算出当前是第几次循环,得出小数,
-// 				// 1+i+1/10:取1以上的小数
-// 				// 结束循环
-// 				return 1 + ((i + 1) / 10);
-// 			}
-// 		}
-// 	}
-// }
-
-// //配置到全局方便使用
-// Vue.prototype.$pageSize = sizeFun();
+// #endif

+ 223 - 217
manifest.json

@@ -1,219 +1,225 @@
 {
-    "name" : "晋掌柜",
-    "appid" : "__UNI__D4FE29A",
-    "description" : "保险类app",
-    "transformPx" : false,
-    "icons" : [
-        {
-            "sizes" : "分辨率,192x192",
-            "src" : "图片路径"
-        }
-    ],
-    "versionName" : "1.5.8",
-    "versionCode" : 158,
-    "app-plus" : {
-        "error" : {
-            "url" : "hybrid/html/error.html"
-        },
-        "compatible" : {
-            "ignoreVersion" : true
-        },
-        "privacy" : {
-            "prompt" : "template",
-            "template" : {
-                "title" : "平台协议和隐私协议",
-                "message" : "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='http://baoxianzhanggui.com:8091/#/pages/login/xieyi'>《平台协议》</a>和<a href='http://baoxianzhanggui.com:8091/#/pages/login/mimi'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
-                "buttonAccept" : "同意",
-                "buttonRefuse" : "暂不同意"
-            }
-        },
-        "modules" : {
-            "Messaging" : {},
-            "OAuth" : {},
-            "Payment" : {},
-            "Share" : {},
-            "Push" : {},
-            "SQLite" : {
-                "description" : "iBeacon"
-            },
-            "Camera" : {}
-        },
-        "distribute" : {
-            "android" : {
-                "permissionPhoneState" : {
-                    "request" : "none",
-                    "prompt" : "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
-                },
-                "permissionExternalStorage" : {
-                    "request" : "always",
-                    "prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
-                },
-                "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
-                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
-                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_SMS\"/>",
-                    "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
-                    "<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
-                    "<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>"
-                ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
-                "minSdkVersion" : 21,
-                "schemes" : "zgcxapp"
-            },
-            "sdkConfigs" : {
-                "ad" : {},
-                "payment" : {
-                    "alipay" : {
-                        "__platform__" : [ "android" ]
-                    },
-                    "weixin" : {
-                        "__platform__" : [ "android" ],
-                        "appid" : "wx612ca90988c46947",
-                        "UniversalLinks" : ""
-                    }
-                },
-                "share" : {
-                    "weixin" : {
-                        "appid" : "wx612ca90988c46947",
-                        "UniversalLinks" : ""
-                    }
-                },
-                "oauth" : {
-                    "weixin" : {
-                        "appid" : "wx612ca90988c46947",
-                        "appsecret" : "75b7d4cda453b2075dec23f849278bc0",
-                        "UniversalLinks" : ""
-                    }
-                },
-                "geolocation" : {
-                    "amap" : {
-                        "__platform__" : [ "android" ],
-                        "appkey_ios" : "",
-                        "appkey_android" : "64ee5a3ca75539df3775271fa987e8bc"
-                    }
-                },
-                "push" : {
-                    "unipush" : {
-                        "appid" : "YDcU8mcWRO6MWIT1i4naP2",
-                        "appkey" : "DK2LTzhnc87pFFFhcTSgs8",
-                        "appsecret" : "wTUMKWB4ReAoPyCp7Jyaz9"
-                    }
-                },
-                "maps" : {}
-            },
-            "icons" : {
-                "android" : {
-                    "hdpi" : "unpackage/res/icons/72x72.png",
-                    "xhdpi" : "unpackage/res/icons/96x96.png",
-                    "xxhdpi" : "unpackage/res/icons/144x144.png",
-                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
-                },
-                "ios" : {
-                    "appstore" : "unpackage/res/icons/1024x1024.png",
-                    "ipad" : {
-                        "app" : "unpackage/res/icons/76x76.png",
-                        "app@2x" : "unpackage/res/icons/152x152.png",
-                        "notification" : "unpackage/res/icons/20x20.png",
-                        "notification@2x" : "unpackage/res/icons/40x40.png",
-                        "proapp@2x" : "unpackage/res/icons/167x167.png",
-                        "settings" : "unpackage/res/icons/29x29.png",
-                        "settings@2x" : "unpackage/res/icons/58x58.png",
-                        "spotlight" : "unpackage/res/icons/40x40.png",
-                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
-                    },
-                    "iphone" : {
-                        "app@2x" : "unpackage/res/icons/120x120.png",
-                        "app@3x" : "unpackage/res/icons/180x180.png",
-                        "notification@2x" : "unpackage/res/icons/40x40.png",
-                        "notification@3x" : "unpackage/res/icons/60x60.png",
-                        "settings@2x" : "unpackage/res/icons/58x58.png",
-                        "settings@3x" : "unpackage/res/icons/87x87.png",
-                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
-                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
-                    }
-                }
-            },
-            "splashscreen" : {
-                "androidStyle" : "common",
-                "useOriginalMsgbox" : false
-            },
-            "ios" : {
-                "dSYMs" : false
-            }
-        },
-        "compilerVersion" : 3,
-        "nvueLaunchMode" : "fast",
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true
-        },
-        "nativePlugins" : {}
-    },
-    // 5+App特有相关
-    "quickapp" : {},
-    // 快应用特有相关
-    "mp-weixin" : {
-        "setting" : {
-            "urlCheck" : false,
-            "es6" : false,
-            "postcss" : false,
-            "minified" : false
-        },
-        "usingComponents" : true,
-        "appid" : "wxe57ddfbe230bcfba",
-        "permission" : {}
-    },
-    "h5" : {
-        "template" : "template.h5.html",
-        "router" : {
-            "mode" : "hash",
-            "base" : "./"
-        },
-        "optimization" : {
-            "treeShaking" : {
-                "enable" : true
-            }
-        },
-        "devServer" : {
-            "https" : false,
-            "port" : 80
-        },
-        "sdkConfigs" : {
-            "maps" : {}
-        },
-        "uniStatistics" : {
-            "enable" : false
-        }
-    },
-    "mp-jd" : {
-        "unipush" : {
-            "enable" : false
-        }
-    }
+	"name": "晋掌柜",
+	"appid": "__UNI__D4FE29A",
+	"description": "保险类app",
+	"transformPx": false,
+	"icons": [{
+		"sizes": "分辨率,192x192",
+		"src": "图片路径"
+	}],
+	"versionName": "1.6.2",
+	"versionCode": 162,
+	"app-plus": {
+		"error": {
+			"url": "hybrid/html/error.html"
+		},
+		"compatible": {
+			"ignoreVersion": true
+		},
+		"privacy": {
+			"prompt": "template",
+			"template": {
+				"title": "平台协议和隐私协议",
+				"message": "请你务必审慎阅读、充分理解“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href='http://baoxianzhanggui.com:8091/#/pages/login/xieyi'>《平台协议》</a>和<a href='http://baoxianzhanggui.com:8091/#/pages/login/mimi'>《隐私协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
+				"buttonAccept": "同意",
+				"buttonRefuse": "暂不同意"
+			}
+		},
+		"modules": {
+			"Messaging": {},
+			"OAuth": {},
+			"Payment": {},
+			"Share": {},
+			"Push": {},
+			"SQLite": {
+				"description": "iBeacon"
+			},
+			"Camera": {},
+			"Geolocation": {},
+			"Maps": {}
+		},
+		"distribute": {
+			"android": {
+				"permissionPhoneState": {
+					"request": "none",
+					"prompt": "为保证您正常、安全地使用,需要获取设备识别码(部分手机提示为获取手机号码)使用权限,请允许。"
+				},
+				"permissionExternalStorage": {
+					"request": "always",
+					"prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
+				},
+				"permissions": [
+					"<uses-feature android:name=\"android.hardware.camera\"/>",
+					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+					"<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
+					"<uses-permission android:name=\"android.permission.INTERNET\"/>",
+					"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
+					"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
+					"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+					"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
+					"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
+					"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
+					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>"
+				],
+				"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
+				"minSdkVersion": 21,
+				"schemes": "zgcxapp"
+			},
+			"sdkConfigs": {
+				"ad": {},
+				"payment": {
+					"alipay": {
+						"__platform__": ["android"]
+					},
+					"weixin": {
+						"__platform__": ["android"],
+						"appid": "wx612ca90988c46947",
+						"UniversalLinks": ""
+					}
+				},
+				"share": {
+					"weixin": {
+						"appid": "wx612ca90988c46947",
+						"UniversalLinks": ""
+					}
+				},
+				"oauth": {
+					"weixin": {
+						"appid": "wx612ca90988c46947",
+						"appsecret": "75b7d4cda453b2075dec23f849278bc0",
+						"UniversalLinks": ""
+					}
+				},
+				"geolocation": {
+					"amap": {
+						"name": "amap_18335592986CWFSxSLAB",
+						"__platform__": ["android"],
+						"appkey_ios": "197d1a12301a306f82533a23651807b8",
+						"appkey_android": "197d1a12301a306f82533a23651807b8"
+					}
+				},
+				"push": {
+					"unipush": {
+						"appid": "YDcU8mcWRO6MWIT1i4naP2",
+						"appkey": "DK2LTzhnc87pFFFhcTSgs8",
+						"appsecret": "wTUMKWB4ReAoPyCp7Jyaz9"
+					}
+				},
+				"maps": {
+					"amap": {
+						"name": "amap_18335592986CWFSxSLAB",
+						"appkey_ios": "197d1a12301a306f82533a23651807b8",
+						"appkey_android": "197d1a12301a306f82533a23651807b8"
+					}
+				}
+			},
+			"icons": {
+				"android": {
+					"hdpi": "unpackage/res/icons/72x72.png",
+					"xhdpi": "unpackage/res/icons/96x96.png",
+					"xxhdpi": "unpackage/res/icons/144x144.png",
+					"xxxhdpi": "unpackage/res/icons/192x192.png"
+				},
+				"ios": {
+					"appstore": "unpackage/res/icons/1024x1024.png",
+					"ipad": {
+						"app": "unpackage/res/icons/76x76.png",
+						"app@2x": "unpackage/res/icons/152x152.png",
+						"notification": "unpackage/res/icons/20x20.png",
+						"notification@2x": "unpackage/res/icons/40x40.png",
+						"proapp@2x": "unpackage/res/icons/167x167.png",
+						"settings": "unpackage/res/icons/29x29.png",
+						"settings@2x": "unpackage/res/icons/58x58.png",
+						"spotlight": "unpackage/res/icons/40x40.png",
+						"spotlight@2x": "unpackage/res/icons/80x80.png"
+					},
+					"iphone": {
+						"app@2x": "unpackage/res/icons/120x120.png",
+						"app@3x": "unpackage/res/icons/180x180.png",
+						"notification@2x": "unpackage/res/icons/40x40.png",
+						"notification@3x": "unpackage/res/icons/60x60.png",
+						"settings@2x": "unpackage/res/icons/58x58.png",
+						"settings@3x": "unpackage/res/icons/87x87.png",
+						"spotlight@2x": "unpackage/res/icons/80x80.png",
+						"spotlight@3x": "unpackage/res/icons/120x120.png"
+					}
+				}
+			},
+			"splashscreen": {
+				"androidStyle": "common",
+				"useOriginalMsgbox": false
+			},
+			"ios": {
+				"dSYMs": false
+			}
+		},
+		"compilerVersion": 3,
+		"nvueLaunchMode": "fast",
+		"splashscreen": {
+			"alwaysShowBeforeRender": true
+		},
+		"nativePlugins": {}
+	},
+	// 5+App特有相关
+	"quickapp": {},
+	// 快应用特有相关
+	"mp-weixin": {
+		"setting": {
+			"urlCheck": false,
+			"es6": false,
+			"postcss": false,
+			"minified": false
+		},
+		"usingComponents": true,
+		"appid": "wxe57ddfbe230bcfba",
+		"permission": {}
+	},
+	"h5": {
+		"template": "template.h5.html",
+		"router": {
+			"mode": "hash",
+			"base": "./"
+		},
+		"optimization": {
+			"treeShaking": {
+				"enable": true
+			}
+		},
+		"devServer": {
+			"https": false,
+			"port": 80
+		},
+		"sdkConfigs": {
+			"maps": {}
+		},
+		"uniStatistics": {
+			"enable": false
+		}
+	},
+	"mp-jd": {
+		"unipush": {
+			"enable": false
+		}
+	}
 }
-// 小程序特有相关
-
+// 小程序特有相关

+ 28 - 0
node_modules/base64-arraybuffer/CHANGELOG.md

@@ -0,0 +1,28 @@
+# Changelog
+
+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.
+
+## [1.0.2](https://github.com/niklasvh/base64-arraybuffer/compare/v1.0.1...v1.0.2) (2022-01-22)
+
+
+### fix
+
+* source maps (#33) ([bd5a8ef](https://github.com/niklasvh/base64-arraybuffer/commit/bd5a8eff3a44ea07f9b68533c477076124220ddd)), closes [#33](https://github.com/niklasvh/base64-arraybuffer/issues/33)
+
+
+
+## [1.0.1](https://github.com/niklasvh/base64-arraybuffer/compare/v1.0.0...v1.0.1) (2021-08-10)
+
+
+### fix
+
+* make lib loadable on ie9 (#30) ([a618d14](https://github.com/niklasvh/base64-arraybuffer/commit/a618d14d323f4eb230321a3609bfbc9f23f430c0)), closes [#30](https://github.com/niklasvh/base64-arraybuffer/issues/30)
+
+
+
+# [1.0.0](https://github.com/niklasvh/base64-arraybuffer/compare/v0.2.0...v1.0.0) (2021-08-10)
+
+
+### docs
+
+* update readme (#29) ([0a0253d](https://github.com/niklasvh/base64-arraybuffer/commit/0a0253dcc2e3f01a1f6d04fa81d578f714fce27f)), closes [#29](https://github.com/niklasvh/base64-arraybuffer/issues/29)

+ 22 - 0
node_modules/base64-arraybuffer/LICENSE

@@ -0,0 +1,22 @@
+Copyright (c) 2012 Niklas von Hertzen
+
+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.

+ 27 - 0
node_modules/base64-arraybuffer/README.md

@@ -0,0 +1,27 @@
+# base64-arraybuffer
+
+![CI](https://github.com/niklasvh/base64-arraybuffer/workflows/CI/badge.svg?branch=master)
+[![NPM Downloads](https://img.shields.io/npm/dm/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
+[![NPM Version](https://img.shields.io/npm/v/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
+
+Encode/decode base64 data into ArrayBuffers
+
+### Installing
+You can install the module via npm:
+
+    npm install base64-arraybuffer
+  
+## API
+The library encodes and decodes base64 to and from ArrayBuffers
+
+ - __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
+ - __decode(str)__ - Decodes base64 string to `ArrayBuffer`
+
+### Testing
+You can run the test suite with:
+
+    npm test
+
+## License
+Copyright (c) 2012 Niklas von Hertzen
+Licensed under the MIT license.

+ 50 - 0
node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js

@@ -0,0 +1,50 @@
+/*
+ * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>
+ * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
+ * Released under MIT License
+ */
+var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+// Use a lookup table to find the index.
+var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+for (var i = 0; i < chars.length; i++) {
+    lookup[chars.charCodeAt(i)] = i;
+}
+var encode = function (arraybuffer) {
+    var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
+    for (i = 0; i < len; i += 3) {
+        base64 += chars[bytes[i] >> 2];
+        base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
+        base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
+        base64 += chars[bytes[i + 2] & 63];
+    }
+    if (len % 3 === 2) {
+        base64 = base64.substring(0, base64.length - 1) + '=';
+    }
+    else if (len % 3 === 1) {
+        base64 = base64.substring(0, base64.length - 2) + '==';
+    }
+    return base64;
+};
+var decode = function (base64) {
+    var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
+    if (base64[base64.length - 1] === '=') {
+        bufferLength--;
+        if (base64[base64.length - 2] === '=') {
+            bufferLength--;
+        }
+    }
+    var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
+    for (i = 0; i < len; i += 4) {
+        encoded1 = lookup[base64.charCodeAt(i)];
+        encoded2 = lookup[base64.charCodeAt(i + 1)];
+        encoded3 = lookup[base64.charCodeAt(i + 2)];
+        encoded4 = lookup[base64.charCodeAt(i + 3)];
+        bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+        bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+        bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+    }
+    return arraybuffer;
+};
+
+export { decode, encode };
+//# sourceMappingURL=base64-arraybuffer.es5.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js.map


+ 61 - 0
node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js

@@ -0,0 +1,61 @@
+/*
+ * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>
+ * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
+ * Released under MIT License
+ */
+(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['base64-arraybuffer'] = {}));
+}(this, (function (exports) { 'use strict';
+
+    var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+    // Use a lookup table to find the index.
+    var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+    for (var i = 0; i < chars.length; i++) {
+        lookup[chars.charCodeAt(i)] = i;
+    }
+    var encode = function (arraybuffer) {
+        var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
+        for (i = 0; i < len; i += 3) {
+            base64 += chars[bytes[i] >> 2];
+            base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
+            base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
+            base64 += chars[bytes[i + 2] & 63];
+        }
+        if (len % 3 === 2) {
+            base64 = base64.substring(0, base64.length - 1) + '=';
+        }
+        else if (len % 3 === 1) {
+            base64 = base64.substring(0, base64.length - 2) + '==';
+        }
+        return base64;
+    };
+    var decode = function (base64) {
+        var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
+        if (base64[base64.length - 1] === '=') {
+            bufferLength--;
+            if (base64[base64.length - 2] === '=') {
+                bufferLength--;
+            }
+        }
+        var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
+        for (i = 0; i < len; i += 4) {
+            encoded1 = lookup[base64.charCodeAt(i)];
+            encoded2 = lookup[base64.charCodeAt(i + 1)];
+            encoded3 = lookup[base64.charCodeAt(i + 2)];
+            encoded4 = lookup[base64.charCodeAt(i + 3)];
+            bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+            bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+            bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+        }
+        return arraybuffer;
+    };
+
+    exports.decode = decode;
+    exports.encode = encode;
+
+    Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+//# sourceMappingURL=base64-arraybuffer.umd.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js.map


+ 48 - 0
node_modules/base64-arraybuffer/dist/lib/index.js

@@ -0,0 +1,48 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.decode = exports.encode = void 0;
+var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+// Use a lookup table to find the index.
+var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+for (var i = 0; i < chars.length; i++) {
+    lookup[chars.charCodeAt(i)] = i;
+}
+var encode = function (arraybuffer) {
+    var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
+    for (i = 0; i < len; i += 3) {
+        base64 += chars[bytes[i] >> 2];
+        base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
+        base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
+        base64 += chars[bytes[i + 2] & 63];
+    }
+    if (len % 3 === 2) {
+        base64 = base64.substring(0, base64.length - 1) + '=';
+    }
+    else if (len % 3 === 1) {
+        base64 = base64.substring(0, base64.length - 2) + '==';
+    }
+    return base64;
+};
+exports.encode = encode;
+var decode = function (base64) {
+    var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
+    if (base64[base64.length - 1] === '=') {
+        bufferLength--;
+        if (base64[base64.length - 2] === '=') {
+            bufferLength--;
+        }
+    }
+    var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);
+    for (i = 0; i < len; i += 4) {
+        encoded1 = lookup[base64.charCodeAt(i)];
+        encoded2 = lookup[base64.charCodeAt(i + 1)];
+        encoded3 = lookup[base64.charCodeAt(i + 2)];
+        encoded4 = lookup[base64.charCodeAt(i + 3)];
+        bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+        bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+        bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+    }
+    return arraybuffer;
+};
+exports.decode = decode;
+//# sourceMappingURL=index.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/base64-arraybuffer/dist/lib/index.js.map


+ 2 - 0
node_modules/base64-arraybuffer/dist/types/index.d.ts

@@ -0,0 +1,2 @@
+export declare const encode: (arraybuffer: ArrayBuffer) => string;
+export declare const decode: (base64: string) => ArrayBuffer;

+ 79 - 0
node_modules/base64-arraybuffer/package.json

@@ -0,0 +1,79 @@
+{
+  "_from": "base64-arraybuffer@^1.0.2",
+  "_id": "base64-arraybuffer@1.0.2",
+  "_inBundle": false,
+  "_integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
+  "_location": "/base64-arraybuffer",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "base64-arraybuffer@^1.0.2",
+    "name": "base64-arraybuffer",
+    "escapedName": "base64-arraybuffer",
+    "rawSpec": "^1.0.2",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.2"
+  },
+  "_requiredBy": [
+    "/utrie"
+  ],
+  "_resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
+  "_shasum": "1c37589a7c4b0746e34bd1feb951da2df01c1bdc",
+  "_spec": "base64-arraybuffer@^1.0.2",
+  "_where": "C:\\Users\\Administrator\\Desktop\\zgcx\\node_modules\\utrie",
+  "author": {
+    "name": "Niklas von Hertzen",
+    "email": "niklasvh@gmail.com",
+    "url": "https://hertzen.com"
+  },
+  "bugs": {
+    "url": "https://github.com/niklasvh/base64-arraybuffer/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Encode/decode base64 data into ArrayBuffers",
+  "devDependencies": {
+    "@rollup/plugin-commonjs": "^19.0.0",
+    "@rollup/plugin-node-resolve": "^13.0.0",
+    "@rollup/plugin-typescript": "^8.2.1",
+    "@types/mocha": "^8.2.2",
+    "@types/node": "^16.0.0",
+    "mocha": "9.0.2",
+    "prettier": "^2.3.2",
+    "rimraf": "3.0.2",
+    "rollup": "^2.52.7",
+    "rollup-plugin-json": "^4.0.0",
+    "rollup-plugin-sourcemaps": "^0.6.3",
+    "standard-version": "^9.3.0",
+    "ts-node": "^10.0.0",
+    "tslib": "^2.3.0",
+    "tslint": "^6.1.3",
+    "tslint-config-prettier": "^1.18.0",
+    "typescript": "^4.3.5"
+  },
+  "engines": {
+    "node": ">= 0.6.0"
+  },
+  "homepage": "https://github.com/niklasvh/base64-arraybuffer",
+  "keywords": [],
+  "license": "MIT",
+  "main": "dist/base64-arraybuffer.umd.js",
+  "module": "dist/base64-arraybuffer.es5.js",
+  "name": "base64-arraybuffer",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/niklasvh/base64-arraybuffer.git"
+  },
+  "scripts": {
+    "build": "tsc --module commonjs && rollup -c rollup.config.ts",
+    "format": "prettier --write \"{src,test}/**/*.ts\"",
+    "lint": "tslint -c tslint.json --project tsconfig.json -t codeFrame src/**/*.ts test/**/*.ts",
+    "mocha": "mocha --require ts-node/register test/*.ts",
+    "prebuild": "rimraf dist/",
+    "release": "standard-version",
+    "test": "npm run lint && npm run mocha"
+  },
+  "typings": "dist/types/index.d.ts",
+  "version": "1.0.2"
+}

+ 0 - 0
node_modules/css-line-break/rollup.config.ts → node_modules/base64-arraybuffer/rollup.config.ts


+ 27 - 0
node_modules/camelcase/index.js

@@ -0,0 +1,27 @@
+'use strict';
+module.exports = function () {
+	var str = [].map.call(arguments, function (str) {
+		return str.trim();
+	}).filter(function (str) {
+		return str.length;
+	}).join('-');
+
+	if (!str.length) {
+		return '';
+	}
+
+	if (str.length === 1 || !(/[_.\- ]+/).test(str) ) {
+		if (str[0] === str[0].toLowerCase() && str.slice(1) !== str.slice(1).toLowerCase()) {
+			return str;
+		}
+
+		return str.toLowerCase();
+	}
+
+	return str
+	.replace(/^[_.\- ]+/, '')
+	.toLowerCase()
+	.replace(/[_.\- ]+(\w|$)/g, function (m, p1) {
+		return p1.toUpperCase();
+	});
+};

+ 21 - 0
node_modules/camelcase/license

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+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.

+ 70 - 0
node_modules/camelcase/package.json

@@ -0,0 +1,70 @@
+{
+  "_from": "camelcase@^1.2.1",
+  "_id": "camelcase@1.2.1",
+  "_inBundle": false,
+  "_integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==",
+  "_location": "/camelcase",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "camelcase@^1.2.1",
+    "name": "camelcase",
+    "escapedName": "camelcase",
+    "rawSpec": "^1.2.1",
+    "saveSpec": null,
+    "fetchSpec": "^1.2.1"
+  },
+  "_requiredBy": [
+    "/uppercamelcase"
+  ],
+  "_resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-1.2.1.tgz",
+  "_shasum": "9bb5304d2e0b56698b2c758b08a3eaa9daa58a39",
+  "_spec": "camelcase@^1.2.1",
+  "_where": "C:\\Users\\Administrator\\Desktop\\zgcx\\node_modules\\uppercamelcase",
+  "author": {
+    "name": "Sindre Sorhus",
+    "email": "sindresorhus@gmail.com",
+    "url": "http://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: foo-bar → fooBar",
+  "devDependencies": {
+    "ava": "0.0.4"
+  },
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/sindresorhus/camelcase#readme",
+  "keywords": [
+    "camelcase",
+    "camel-case",
+    "camel",
+    "case",
+    "dash",
+    "hyphen",
+    "dot",
+    "underscore",
+    "separator",
+    "string",
+    "text",
+    "convert"
+  ],
+  "license": "MIT",
+  "name": "camelcase",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/sindresorhus/camelcase.git"
+  },
+  "scripts": {
+    "test": "node test.js"
+  },
+  "version": "1.2.1"
+}

+ 56 - 0
node_modules/camelcase/readme.md

@@ -0,0 +1,56 @@
+# 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: `foo-bar` → `fooBar`
+
+
+## Install
+
+```sh
+$ npm install --save camelcase
+```
+
+
+## Usage
+
+```js
+var camelCase = require('camelcase');
+
+camelCase('foo-bar');
+//=> fooBar
+
+camelCase('foo_bar');
+//=> fooBar
+
+camelCase('Foo-Bar');
+//=> fooBar
+
+camelCase('--foo.bar');
+//=> fooBar
+
+camelCase('__foo__bar__');
+//=> fooBar
+
+camelCase('foo bar');
+//=> fooBar
+
+console.log(process.argv[3]);
+//=> --foo-bar
+camelCase(process.argv[3]);
+//=> fooBar
+
+camelCase('foo', 'bar');
+//=> fooBar
+
+camelCase('__foo__', '--bar');
+//=> fooBar
+```
+
+
+## Related
+
+See [`decamelize`](https://github.com/sindresorhus/decamelize) for the inverse.
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)

+ 0 - 0
node_modules/css-line-break/CHANGELOG.md → node_modules/html2canvas/node_modules/css-line-break/CHANGELOG.md


+ 0 - 0
node_modules/css-line-break/LICENSE → node_modules/html2canvas/node_modules/css-line-break/LICENSE


+ 0 - 0
node_modules/css-line-break/README.md → node_modules/html2canvas/node_modules/css-line-break/README.md


+ 0 - 0
node_modules/css-line-break/dist/css-line-break.es5.js → node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.es5.js


+ 0 - 0
node_modules/css-line-break/dist/css-line-break.es5.js.map → node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.es5.js.map


+ 0 - 0
node_modules/css-line-break/dist/css-line-break.umd.js → node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.umd.js


+ 0 - 0
node_modules/css-line-break/dist/css-line-break.umd.js.map → node_modules/html2canvas/node_modules/css-line-break/dist/css-line-break.umd.js.map


+ 0 - 0
node_modules/css-line-break/dist/lib/LineBreak.js → node_modules/html2canvas/node_modules/css-line-break/dist/lib/LineBreak.js


+ 0 - 0
node_modules/css-line-break/dist/lib/LineBreak.js.map → node_modules/html2canvas/node_modules/css-line-break/dist/lib/LineBreak.js.map


+ 0 - 0
node_modules/css-line-break/dist/lib/Util.js → node_modules/html2canvas/node_modules/css-line-break/dist/lib/Util.js


+ 0 - 0
node_modules/css-line-break/dist/lib/Util.js.map → node_modules/html2canvas/node_modules/css-line-break/dist/lib/Util.js.map


+ 0 - 0
node_modules/css-line-break/dist/lib/index.js → node_modules/html2canvas/node_modules/css-line-break/dist/lib/index.js


+ 0 - 0
node_modules/css-line-break/dist/lib/index.js.map → node_modules/html2canvas/node_modules/css-line-break/dist/lib/index.js.map


+ 0 - 0
node_modules/css-line-break/dist/lib/linebreak-trie.js → node_modules/html2canvas/node_modules/css-line-break/dist/lib/linebreak-trie.js


+ 0 - 0
node_modules/css-line-break/dist/lib/linebreak-trie.js.map → node_modules/html2canvas/node_modules/css-line-break/dist/lib/linebreak-trie.js.map


+ 0 - 0
node_modules/css-line-break/dist/types/LineBreak.d.ts → node_modules/html2canvas/node_modules/css-line-break/dist/types/LineBreak.d.ts


+ 0 - 0
node_modules/css-line-break/dist/types/Util.d.ts → node_modules/html2canvas/node_modules/css-line-break/dist/types/Util.d.ts


+ 0 - 0
node_modules/css-line-break/dist/types/index.d.ts → node_modules/html2canvas/node_modules/css-line-break/dist/types/index.d.ts


+ 0 - 0
node_modules/css-line-break/dist/types/linebreak-trie.d.ts → node_modules/html2canvas/node_modules/css-line-break/dist/types/linebreak-trie.d.ts


+ 2 - 2
node_modules/css-line-break/package.json → node_modules/html2canvas/node_modules/css-line-break/package.json

@@ -3,7 +3,7 @@
   "_id": "css-line-break@2.1.0",
   "_inBundle": false,
   "_integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
-  "_location": "/css-line-break",
+  "_location": "/html2canvas/css-line-break",
   "_phantomChildren": {},
   "_requested": {
     "type": "range",
@@ -18,7 +18,7 @@
   "_requiredBy": [
     "/html2canvas"
   ],
-  "_resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
+  "_resolved": "https://registry.npmmirror.com/css-line-break/-/css-line-break-2.1.0.tgz",
   "_shasum": "bfef660dfa6f5397ea54116bb3cb4873edbc4fa0",
   "_spec": "css-line-break@^2.1.0",
   "_where": "C:\\Users\\Administrator\\Desktop\\zgcx\\node_modules\\html2canvas",

+ 40 - 0
node_modules/html2canvas/node_modules/css-line-break/rollup.config.ts

@@ -0,0 +1,40 @@
+import resolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
+import sourceMaps from 'rollup-plugin-sourcemaps';
+import typescript from '@rollup/plugin-typescript';
+import json from 'rollup-plugin-json';
+
+const pkg = require('./package.json');
+
+const banner = `/*
+ * ${pkg.name} ${pkg.version} <${pkg.homepage}>
+ * Copyright (c) ${(new Date()).getFullYear()} ${pkg.author.name} <${pkg.author.url}>
+ * Released under ${pkg.license} License
+ */`;
+
+export default {
+    input: `src/index.ts`,
+    output: [
+        { file: pkg.main, name: pkg.name, format: 'umd', banner, sourcemap: true },
+        { file: pkg.module, format: 'esm', banner, sourcemap: true },
+    ],
+    external: [],
+    watch: {
+        include: 'src/**',
+    },
+    plugins: [
+        // Allow node_modules resolution, so you can use 'external' to control
+        // which external modules to include in the bundle
+        // https://github.com/rollup/rollup-plugin-node-resolve#usage
+        resolve(),
+        // Allow json resolution
+        json(),
+        // Compile TypeScript files
+        typescript({ sourceMap: true, inlineSources: true }),
+        // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
+        commonjs(),
+
+        // Resolve source maps to the original source
+        sourceMaps(),
+    ],
+}

+ 43 - 0
node_modules/text-segmentation/CHANGELOG.md

@@ -0,0 +1,43 @@
+# Changelog
+
+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.
+
+## [1.0.3](https://github.com/niklasvh/text-segmentation/compare/v1.0.2...v1.0.3) (2022-01-22)
+
+
+### fix
+
+* source maps ([4108278](https://github.com/niklasvh/text-segmentation/commit/4108278c278b271543e9a997dbf14ce14e946fe7))
+
+
+
+## [1.0.2](https://github.com/niklasvh/text-segmentation/compare/v1.0.1...v1.0.2) (2021-08-10)
+
+
+### deps
+
+* update base64-arraybuffer ([3804223](https://github.com/niklasvh/text-segmentation/commit/3804223855fa4f37e8c784dca5ce5113c33d3e27))
+
+
+
+## [1.0.1](https://github.com/niklasvh/text-segmentation/compare/v1.0.0...v1.0.1) (2021-08-09)
+
+
+### docs
+
+* add readme ([c3f1dd3](https://github.com/niklasvh/text-segmentation/commit/c3f1dd31ef4880ad7b8ecab5155f7362d4d652d3))
+
+### feat
+
+* expose fromCodePoint / toCodePoints ([a497aeb](https://github.com/niklasvh/text-segmentation/commit/a497aeb75255fec597b8c4b0803e3b57d6a06a25))
+
+
+
+# 1.0.0 (2021-08-09)
+
+
+### feat
+
+* add grapheme breaker trie ([0e5a06b](https://github.com/niklasvh/text-segmentation/commit/0e5a06b4ab7f1eef9cf7b01fc47bdb270c5704c0))
+* implement grapheme breaker ([7e065b5](https://github.com/niklasvh/text-segmentation/commit/7e065b5b2484d2dcd06efc487d938289c197fee0))
+* implement splitter ([8a52b31](https://github.com/niklasvh/text-segmentation/commit/8a52b318368ea994b245daf4ac056319ee697f24))

+ 22 - 0
node_modules/text-segmentation/LICENSE

@@ -0,0 +1,22 @@
+Copyright (c) 2021 Niklas von Hertzen
+
+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.

+ 27 - 0
node_modules/text-segmentation/README.md

@@ -0,0 +1,27 @@
+text-segmentation
+==============
+
+![CI](https://github.com/niklasvh/text-segmentation/workflows/CI/badge.svg?branch=main)
+[![NPM Downloads](https://img.shields.io/npm/dm/text-segmentation.svg)](https://www.npmjs.org/package/text-segmentation)
+[![NPM Version](https://img.shields.io/npm/v/text-segmentation.svg)](https://www.npmjs.org/package/text-segmentation)
+
+A JavaScript library for Grapheme Breaking and identifying Grapheme Boundaries, [implementing the Unicode Line Breaking Algorithm (UAX #29)](https://unicode.org/reports/tr29/)
+
+### Installing
+You can install the module via npm:
+
+    npm install text-segmentation
+  
+### Example
+```javascript
+import {splitGraphemes} from 'text-segmentation';
+
+const graphemes =  splitGraphemes('Hello 👨‍👩‍👧‍👦!');
+```    
+
+### Testing
+You can run the test suite with:
+
+    npm test
+
+The library implements all the [GraphemeBreakTest.txt tests](https://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakTest.txt).

+ 218 - 0
node_modules/text-segmentation/dist/lib/GraphemeBreak.js

@@ -0,0 +1,218 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.splitGraphemes = exports.GraphemeBreaker = exports.graphemeBreakAtIndex = exports.codePointToClass = exports.BREAK_ALLOWED = exports.BREAK_NOT_ALLOWED = exports.UnicodeTrie = exports.fromCodePoint = exports.toCodePoints = exports.classes = void 0;
+var grapheme_break_trie_1 = require("./grapheme-break-trie");
+var utrie_1 = require("utrie");
+var Other = 0;
+var Prepend = 1;
+var CR = 2;
+var LF = 3;
+var Control = 4;
+var Extend = 5;
+var Regional_Indicator = 6;
+var SpacingMark = 7;
+var L = 8;
+var V = 9;
+var T = 10;
+var LV = 11;
+var LVT = 12;
+var ZWJ = 13;
+var Extended_Pictographic = 14;
+var RI = 15;
+exports.classes = {
+    Other: Other,
+    Prepend: Prepend,
+    CR: CR,
+    LF: LF,
+    Control: Control,
+    Extend: Extend,
+    Regional_Indicator: Regional_Indicator,
+    SpacingMark: SpacingMark,
+    L: L,
+    V: V,
+    T: T,
+    LV: LV,
+    LVT: LVT,
+    ZWJ: ZWJ,
+    Extended_Pictographic: Extended_Pictographic,
+    RI: RI,
+};
+var toCodePoints = function (str) {
+    var codePoints = [];
+    var i = 0;
+    var length = str.length;
+    while (i < length) {
+        var value = str.charCodeAt(i++);
+        if (value >= 0xd800 && value <= 0xdbff && i < length) {
+            var extra = str.charCodeAt(i++);
+            if ((extra & 0xfc00) === 0xdc00) {
+                codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
+            }
+            else {
+                codePoints.push(value);
+                i--;
+            }
+        }
+        else {
+            codePoints.push(value);
+        }
+    }
+    return codePoints;
+};
+exports.toCodePoints = toCodePoints;
+var fromCodePoint = function () {
+    var codePoints = [];
+    for (var _i = 0; _i < arguments.length; _i++) {
+        codePoints[_i] = arguments[_i];
+    }
+    if (String.fromCodePoint) {
+        return String.fromCodePoint.apply(String, codePoints);
+    }
+    var length = codePoints.length;
+    if (!length) {
+        return '';
+    }
+    var codeUnits = [];
+    var index = -1;
+    var result = '';
+    while (++index < length) {
+        var codePoint = codePoints[index];
+        if (codePoint <= 0xffff) {
+            codeUnits.push(codePoint);
+        }
+        else {
+            codePoint -= 0x10000;
+            codeUnits.push((codePoint >> 10) + 0xd800, (codePoint % 0x400) + 0xdc00);
+        }
+        if (index + 1 === length || codeUnits.length > 0x4000) {
+            result += String.fromCharCode.apply(String, codeUnits);
+            codeUnits.length = 0;
+        }
+    }
+    return result;
+};
+exports.fromCodePoint = fromCodePoint;
+exports.UnicodeTrie = utrie_1.createTrieFromBase64(grapheme_break_trie_1.base64, grapheme_break_trie_1.byteLength);
+exports.BREAK_NOT_ALLOWED = '×';
+exports.BREAK_ALLOWED = '÷';
+var codePointToClass = function (codePoint) { return exports.UnicodeTrie.get(codePoint); };
+exports.codePointToClass = codePointToClass;
+var _graphemeBreakAtIndex = function (_codePoints, classTypes, index) {
+    var prevIndex = index - 2;
+    var prev = classTypes[prevIndex];
+    var current = classTypes[index - 1];
+    var next = classTypes[index];
+    // GB3 Do not break between a CR and LF
+    if (current === CR && next === LF) {
+        return exports.BREAK_NOT_ALLOWED;
+    }
+    // GB4 Otherwise, break before and after controls.
+    if (current === CR || current === LF || current === Control) {
+        return exports.BREAK_ALLOWED;
+    }
+    // GB5
+    if (next === CR || next === LF || next === Control) {
+        return exports.BREAK_ALLOWED;
+    }
+    // Do not break Hangul syllable sequences.
+    // GB6
+    if (current === L && [L, V, LV, LVT].indexOf(next) !== -1) {
+        return exports.BREAK_NOT_ALLOWED;
+    }
+    // GB7
+    if ((current === LV || current === V) && (next === V || next === T)) {
+        return exports.BREAK_NOT_ALLOWED;
+    }
+    // GB8
+    if ((current === LVT || current === T) && next === T) {
+        return exports.BREAK_NOT_ALLOWED;
+    }
+    // GB9 Do not break before extending characters or ZWJ.
+    if (next === ZWJ || next === Extend) {
+        return exports.BREAK_NOT_ALLOWED;
+    }
+    // Do not break before SpacingMarks, or after Prepend characters.
+    // GB9a
+    if (next === SpacingMark) {
+        return exports.BREAK_NOT_ALLOWED;
+    }
+    // GB9a
+    if (current === Prepend) {
+        return exports.BREAK_NOT_ALLOWED;
+    }
+    // GB11 Do not break within emoji modifier sequences or emoji zwj sequences.
+    if (current === ZWJ && next === Extended_Pictographic) {
+        while (prev === Extend) {
+            prev = classTypes[--prevIndex];
+        }
+        if (prev === Extended_Pictographic) {
+            return exports.BREAK_NOT_ALLOWED;
+        }
+    }
+    // GB12 Do not break within emoji flag sequences.
+    // That is, do not break between regional indicator (RI) symbols
+    // if there is an odd number of RI characters before the break point.
+    if (current === RI && next === RI) {
+        var countRI = 0;
+        while (prev === RI) {
+            countRI++;
+            prev = classTypes[--prevIndex];
+        }
+        if (countRI % 2 === 0) {
+            return exports.BREAK_NOT_ALLOWED;
+        }
+    }
+    return exports.BREAK_ALLOWED;
+};
+var graphemeBreakAtIndex = function (codePoints, index) {
+    // GB1 Break at the start and end of text, unless the text is empty.
+    if (index === 0) {
+        return exports.BREAK_ALLOWED;
+    }
+    // GB2
+    if (index >= codePoints.length) {
+        return exports.BREAK_ALLOWED;
+    }
+    var classTypes = codePoints.map(exports.codePointToClass);
+    return _graphemeBreakAtIndex(codePoints, classTypes, index);
+};
+exports.graphemeBreakAtIndex = graphemeBreakAtIndex;
+var GraphemeBreaker = function (str) {
+    var codePoints = exports.toCodePoints(str);
+    var length = codePoints.length;
+    var index = 0;
+    var lastEnd = 0;
+    var classTypes = codePoints.map(exports.codePointToClass);
+    return {
+        next: function () {
+            if (index >= length) {
+                return { done: true, value: null };
+            }
+            var graphemeBreak = exports.BREAK_NOT_ALLOWED;
+            while (index < length &&
+                (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index)) === exports.BREAK_NOT_ALLOWED) { }
+            if (graphemeBreak !== exports.BREAK_NOT_ALLOWED || index === length) {
+                var value = exports.fromCodePoint.apply(null, codePoints.slice(lastEnd, index));
+                lastEnd = index;
+                return { value: value, done: false };
+            }
+            return { done: true, value: null };
+            while (index < length) { }
+            return { done: true, value: null };
+        },
+    };
+};
+exports.GraphemeBreaker = GraphemeBreaker;
+var splitGraphemes = function (str) {
+    var breaker = exports.GraphemeBreaker(str);
+    var graphemes = [];
+    var bk;
+    while (!(bk = breaker.next()).done) {
+        if (bk.value) {
+            graphemes.push(bk.value.slice());
+        }
+    }
+    return graphemes;
+};
+exports.splitGraphemes = splitGraphemes;
+//# sourceMappingURL=GraphemeBreak.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/text-segmentation/dist/lib/GraphemeBreak.js.map


File diff suppressed because it is too large
+ 3 - 0
node_modules/text-segmentation/dist/lib/grapheme-break-trie.js


+ 1 - 0
node_modules/text-segmentation/dist/lib/grapheme-break-trie.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"grapheme-break-trie.js","sourceRoot":"","sources":["../../src/grapheme-break-trie.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GACf,8izBAA8izB,CAAC;AACtizB,QAAA,UAAU,GAAG,KAAK,CAAC"}

+ 9 - 0
node_modules/text-segmentation/dist/lib/index.js

@@ -0,0 +1,9 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.toCodePoints = exports.fromCodePoint = exports.splitGraphemes = exports.GraphemeBreaker = void 0;
+var GraphemeBreak_1 = require("./GraphemeBreak");
+Object.defineProperty(exports, "GraphemeBreaker", { enumerable: true, get: function () { return GraphemeBreak_1.GraphemeBreaker; } });
+Object.defineProperty(exports, "splitGraphemes", { enumerable: true, get: function () { return GraphemeBreak_1.splitGraphemes; } });
+Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return GraphemeBreak_1.fromCodePoint; } });
+Object.defineProperty(exports, "toCodePoints", { enumerable: true, get: function () { return GraphemeBreak_1.toCodePoints; } });
+//# sourceMappingURL=index.js.map

+ 1 - 0
node_modules/text-segmentation/dist/lib/index.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAA6F;AAArF,gHAAA,eAAe,OAAA;AAAE,+GAAA,cAAc,OAAA;AAAE,8GAAA,aAAa,OAAA;AAAE,6GAAA,YAAY,OAAA"}

File diff suppressed because it is too large
+ 5 - 0
node_modules/text-segmentation/dist/text-segmentation.es5.js


File diff suppressed because it is too large
+ 0 - 0
node_modules/text-segmentation/dist/text-segmentation.es5.js.map


File diff suppressed because it is too large
+ 11 - 0
node_modules/text-segmentation/dist/text-segmentation.umd.js


File diff suppressed because it is too large
+ 0 - 0
node_modules/text-segmentation/dist/text-segmentation.umd.js.map


+ 21 - 0
node_modules/text-segmentation/dist/types/GraphemeBreak.d.ts

@@ -0,0 +1,21 @@
+export declare const classes: {
+    [key: string]: number;
+};
+export declare const toCodePoints: (str: string) => number[];
+export declare const fromCodePoint: (...codePoints: number[]) => string;
+export declare const UnicodeTrie: import("utrie").Trie;
+export declare const BREAK_NOT_ALLOWED = "\u00D7";
+export declare const BREAK_ALLOWED = "\u00F7";
+export declare type BREAK_OPPORTUNITIES = typeof BREAK_NOT_ALLOWED | typeof BREAK_ALLOWED;
+export declare const codePointToClass: (codePoint: number) => number;
+export declare const graphemeBreakAtIndex: (codePoints: number[], index: number) => BREAK_OPPORTUNITIES;
+export declare const GraphemeBreaker: (str: string) => {
+    next: () => {
+        done: boolean;
+        value: null;
+    } | {
+        value: string;
+        done: boolean;
+    };
+};
+export declare const splitGraphemes: (str: string) => string[];

File diff suppressed because it is too large
+ 0 - 0
node_modules/text-segmentation/dist/types/grapheme-break-trie.d.ts


+ 1 - 0
node_modules/text-segmentation/dist/types/index.d.ts

@@ -0,0 +1 @@
+export { GraphemeBreaker, splitGraphemes, fromCodePoint, toCodePoints } from './GraphemeBreak';

+ 80 - 0
node_modules/text-segmentation/package.json

@@ -0,0 +1,80 @@
+{
+  "_from": "text-segmentation@^1.0.3",
+  "_id": "text-segmentation@1.0.3",
+  "_inBundle": false,
+  "_integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
+  "_location": "/text-segmentation",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "text-segmentation@^1.0.3",
+    "name": "text-segmentation",
+    "escapedName": "text-segmentation",
+    "rawSpec": "^1.0.3",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.3"
+  },
+  "_requiredBy": [
+    "/html2canvas"
+  ],
+  "_resolved": "https://registry.npmmirror.com/text-segmentation/-/text-segmentation-1.0.3.tgz",
+  "_shasum": "52a388159efffe746b24a63ba311b6ac9f2d7943",
+  "_spec": "text-segmentation@^1.0.3",
+  "_where": "C:\\Users\\Administrator\\Desktop\\zgcx\\node_modules\\html2canvas",
+  "author": {
+    "name": "Niklas von Hertzen",
+    "email": "niklasvh@gmail.com",
+    "url": "https://hertzen.com"
+  },
+  "bugs": {
+    "url": "https://github.com/niklasvh/text-segmentation/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "utrie": "^1.0.2"
+  },
+  "deprecated": false,
+  "description": "text-segmentation ==============",
+  "devDependencies": {
+    "@rollup/plugin-commonjs": "^19.0.0",
+    "@rollup/plugin-node-resolve": "^13.0.0",
+    "@rollup/plugin-typescript": "^8.2.1",
+    "@types/mocha": "^8.2.2",
+    "@types/node": "^16.0.0",
+    "mocha": "9.0.2",
+    "prettier": "^2.3.2",
+    "rimraf": "3.0.2",
+    "rollup": "^2.52.7",
+    "rollup-plugin-json": "^4.0.0",
+    "rollup-plugin-sourcemaps": "^0.6.3",
+    "standard-version": "^9.3.0",
+    "ts-node": "^10.0.0",
+    "tslib": "^2.3.0",
+    "tslint": "^6.1.3",
+    "tslint-config-prettier": "^1.18.0",
+    "typescript": "^4.3.5"
+  },
+  "homepage": "https://github.com/niklasvh/text-segmentation",
+  "license": "MIT",
+  "main": "dist/text-segmentation.umd.js",
+  "module": "dist/text-segmentation.es5.js",
+  "name": "text-segmentation",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/niklasvh/text-segmentation.git"
+  },
+  "scripts": {
+    "build": "tsc --module commonjs && rollup -c rollup.config.ts",
+    "format": "prettier --write \"{src,scripts}/**/*.ts\"",
+    "generate-tests": "ts-node scripts/generate_grapheme_break_tests.ts",
+    "generate-trie": "ts-node scripts/generate_grapheme_break_trie.ts",
+    "lint": "tslint -c tslint.json --project tsconfig.json -t codeFrame src/**/*.ts tests/**/*.ts scripts/**/*.ts",
+    "mocha": "mocha --require ts-node/register tests/*.ts",
+    "prebuild": "rimraf dist/",
+    "release": "standard-version",
+    "test": "npm run lint && npm run mocha"
+  },
+  "typings": "dist/types/index.d.ts",
+  "version": "1.0.3"
+}

+ 40 - 0
node_modules/text-segmentation/rollup.config.ts

@@ -0,0 +1,40 @@
+import resolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
+import sourceMaps from 'rollup-plugin-sourcemaps';
+import typescript from '@rollup/plugin-typescript';
+import json from 'rollup-plugin-json';
+
+const pkg = require('./package.json');
+
+const banner = `/*
+ * ${pkg.name} ${pkg.version} <${pkg.homepage}>
+ * Copyright (c) ${(new Date()).getFullYear()} ${pkg.author.name} <${pkg.author.url}>
+ * Released under ${pkg.license} License
+ */`;
+
+export default {
+    input: `src/index.ts`,
+    output: [
+        { file: pkg.main, name: pkg.name, format: 'umd', banner, sourcemap: true },
+        { file: pkg.module, format: 'esm', banner, sourcemap: true },
+    ],
+    external: [],
+    watch: {
+        include: 'src/**',
+    },
+    plugins: [
+        // Allow node_modules resolution, so you can use 'external' to control
+        // which external modules to include in the bundle
+        // https://github.com/rollup/rollup-plugin-node-resolve#usage
+        resolve(),
+        // Allow json resolution
+        json(),
+        // Compile TypeScript files
+        typescript({ sourceMap: true, inlineSources: true }),
+        // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
+        commonjs(),
+
+        // Resolve source maps to the original source
+        sourceMaps(),
+    ],
+}

+ 21 - 0
node_modules/uppercamelcase/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Sam Verschueren
+
+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.

+ 52 - 0
node_modules/uppercamelcase/README.md

@@ -0,0 +1,52 @@
+# UpperCamelCase [![Build Status](https://travis-ci.org/SamVerschueren/uppercamelcase.svg?branch=master)](https://travis-ci.org/SamVerschueren/uppercamelcase)
+
+> Convert a dash/dot/underscore/space separated string to UpperCamelCase: `foo-bar` → `FooBar`
+
+## Install
+
+```sh
+$ npm install --save uppercamelcase
+```
+
+## Usage
+
+```js
+var upperCamelCase = require('uppercamelcase');
+
+upperCamelCase('foo-bar');
+//=> FooBar
+
+upperCamelCase('foo_bar');
+//=> FooBar
+
+upperCamelCase('Foo-Bar');
+//=> FooBar
+
+upperCamelCase('--foo.bar');
+//=> FooBar
+
+upperCamelCase('__foo__bar__');
+//=> FooBar
+
+upperCamelCase('foo bar');
+//=> FooBar
+
+console.log(process.argv[3]);
+//=> --foo-bar
+upperCamelCase(process.argv[3]);
+//=> FooBar
+
+camelCase('foo', 'bar');
+//=> 'FooBar'
+
+camelCase('__foo__', '--bar');
+//=> 'FooBar'
+```
+
+## Related
+
+- [`camelcase`](https://github.com/sindresorhus/camelcase) - The lowerCamelCase variant
+
+## License
+
+MIT © Sam Verschueren

+ 7 - 0
node_modules/uppercamelcase/index.js

@@ -0,0 +1,7 @@
+'use strict';
+var camelCase = require('camelcase');
+
+module.exports = function () {
+	var cased = camelCase.apply(camelCase, arguments);
+	return cased.charAt(0).toUpperCase() + cased.slice(1);
+};

+ 63 - 0
node_modules/uppercamelcase/package.json

@@ -0,0 +1,63 @@
+{
+  "_from": "uppercamelcase@^1.1.0",
+  "_id": "uppercamelcase@1.1.0",
+  "_inBundle": false,
+  "_integrity": "sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA==",
+  "_location": "/uppercamelcase",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "uppercamelcase@^1.1.0",
+    "name": "uppercamelcase",
+    "escapedName": "uppercamelcase",
+    "rawSpec": "^1.1.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.1.0"
+  },
+  "_requiredBy": [
+    "/vue-amap"
+  ],
+  "_resolved": "https://registry.npmmirror.com/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
+  "_shasum": "324d98a6b3afc7e8a8953e10641509b0e4e23f97",
+  "_spec": "uppercamelcase@^1.1.0",
+  "_where": "C:\\Users\\Administrator\\Desktop\\zgcx\\node_modules\\vue-amap",
+  "author": {
+    "name": "Sam Verschueren",
+    "email": "sam.verschueren@gmail.com"
+  },
+  "bugs": {
+    "url": "https://github.com/SamVerschueren/uppercamelcase/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "camelcase": "^1.2.1"
+  },
+  "deprecated": false,
+  "description": "Convert a dash/dot/underscore/space separated string to UpperCamelCase",
+  "devDependencies": {
+    "ava": "*",
+    "xo": "*"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/SamVerschueren/uppercamelcase#readme",
+  "keywords": [
+    "camelcase",
+    "uppercamelcase",
+    "upper",
+    "camel",
+    "case"
+  ],
+  "license": "MIT",
+  "name": "uppercamelcase",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/SamVerschueren/uppercamelcase.git"
+  },
+  "scripts": {
+    "test": "xo && ava"
+  },
+  "version": "1.1.0"
+}

+ 32 - 0
node_modules/utrie/CHANGELOG.md

@@ -0,0 +1,32 @@
+# Changelog
+
+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.
+
+## [1.0.2](https://github.com/niklasvh/utrie/compare/v1.0.1...v1.0.2) (2022-01-22)
+
+
+### fix
+
+* sourcemaps ([1e6e126](https://github.com/niklasvh/utrie/commit/1e6e12671fa187b5fbaca893460f114b085ce054))
+
+
+
+## [1.0.1](https://github.com/niklasvh/utrie/compare/v1.0.0...v1.0.1) (2021-08-10)
+
+
+### deps
+
+* update base64-arraybuffer ([6a731a7](https://github.com/niklasvh/utrie/commit/6a731a77d34165905f7d91adc6fa3f4bb8a317d2))
+
+
+
+# 1.0.0 (2021-08-09)
+
+
+### deps
+
+* add tslib ([3aaa8b1](https://github.com/niklasvh/utrie/commit/3aaa8b181e4eede4b55e50b0145e4bffb1366f82))
+
+### fix
+
+* main branch ([54e8310](https://github.com/niklasvh/utrie/commit/54e83101d7443e8b0e5761c7985ec94ee8ad1f6d))

+ 22 - 0
node_modules/utrie/LICENSE

@@ -0,0 +1,22 @@
+Copyright (c) 2021 Niklas von Hertzen
+
+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.

+ 143 - 0
node_modules/utrie/dist/lib/Trie.js

@@ -0,0 +1,143 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Trie = exports.createTrieFromBase64 = exports.UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_DATA_MASK = exports.UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_SHIFT_1_2 = exports.UTRIE2_INDEX_SHIFT = exports.UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_2 = void 0;
+var Util_1 = require("./Util");
+/** Shift size for getting the index-2 table offset. */
+exports.UTRIE2_SHIFT_2 = 5;
+/** Shift size for getting the index-1 table offset. */
+exports.UTRIE2_SHIFT_1 = 6 + 5;
+/**
+ * Shift size for shifting left the index array values.
+ * Increases possible data size with 16-bit index values at the cost
+ * of compactability.
+ * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
+ */
+exports.UTRIE2_INDEX_SHIFT = 2;
+/**
+ * Difference between the two shift sizes,
+ * for getting an index-1 offset from an index-2 offset. 6=11-5
+ */
+exports.UTRIE2_SHIFT_1_2 = exports.UTRIE2_SHIFT_1 - exports.UTRIE2_SHIFT_2;
+/**
+ * The part of the index-2 table for U+D800..U+DBFF stores values for
+ * lead surrogate code _units_ not code _points_.
+ * Values for lead surrogate code _points_ are indexed with this portion of the table.
+ * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
+ */
+exports.UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> exports.UTRIE2_SHIFT_2;
+/** Number of entries in a data block. 32=0x20 */
+exports.UTRIE2_DATA_BLOCK_LENGTH = 1 << exports.UTRIE2_SHIFT_2;
+/** Mask for getting the lower bits for the in-data-block offset. */
+exports.UTRIE2_DATA_MASK = exports.UTRIE2_DATA_BLOCK_LENGTH - 1;
+exports.UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> exports.UTRIE2_SHIFT_2;
+/** Count the lengths of both BMP pieces. 2080=0x820 */
+exports.UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_LSCP_INDEX_2_OFFSET + exports.UTRIE2_LSCP_INDEX_2_LENGTH;
+/**
+ * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
+ * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
+ */
+exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_INDEX_2_BMP_LENGTH;
+exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
+/**
+ * The index-1 table, only used for supplementary code points, at offset 2112=0x840.
+ * Variable length, for code points up to highStart, where the last single-value range starts.
+ * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
+ * (For 0x100000 supplementary code points U+10000..U+10ffff.)
+ *
+ * The part of the index-2 table for supplementary code points starts
+ * after this index-1 table.
+ *
+ * Both the index-1 table and the following part of the index-2 table
+ * are omitted completely if there is only BMP data.
+ */
+exports.UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET + exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH;
+/**
+ * Number of index-1 entries for the BMP. 32=0x20
+ * This part of the index-1 table is omitted from the serialized form.
+ */
+exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> exports.UTRIE2_SHIFT_1;
+/** Number of entries in an index-2 block. 64=0x40 */
+exports.UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << exports.UTRIE2_SHIFT_1_2;
+/** Mask for getting the lower bits for the in-index-2-block offset. */
+exports.UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
+var slice16 = function (view, start, end) {
+    if (view.slice) {
+        return view.slice(start, end);
+    }
+    return new Uint16Array(Array.prototype.slice.call(view, start, end));
+};
+var slice32 = function (view, start, end) {
+    if (view.slice) {
+        return view.slice(start, end);
+    }
+    return new Uint32Array(Array.prototype.slice.call(view, start, end));
+};
+var createTrieFromBase64 = function (base64, _byteLength) {
+    var buffer = Util_1.decode(base64);
+    var view32 = Array.isArray(buffer) ? Util_1.polyUint32Array(buffer) : new Uint32Array(buffer);
+    var view16 = Array.isArray(buffer) ? Util_1.polyUint16Array(buffer) : new Uint16Array(buffer);
+    var headerLength = 24;
+    var index = slice16(view16, headerLength / 2, view32[4] / 2);
+    var data = view32[5] === 2
+        ? slice16(view16, (headerLength + view32[4]) / 2)
+        : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));
+    return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
+};
+exports.createTrieFromBase64 = createTrieFromBase64;
+var Trie = /** @class */ (function () {
+    function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
+        this.initialValue = initialValue;
+        this.errorValue = errorValue;
+        this.highStart = highStart;
+        this.highValueIndex = highValueIndex;
+        this.index = index;
+        this.data = data;
+    }
+    /**
+     * Get the value for a code point as stored in the Trie.
+     *
+     * @param codePoint the code point
+     * @return the value
+     */
+    Trie.prototype.get = function (codePoint) {
+        var ix;
+        if (codePoint >= 0) {
+            if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {
+                // Ordinary BMP code point, excluding leading surrogates.
+                // BMP uses a single level lookup.  BMP index starts at offset 0 in the Trie2 index.
+                // 16 bit data is stored in the index array itself.
+                ix = this.index[codePoint >> exports.UTRIE2_SHIFT_2];
+                ix = (ix << exports.UTRIE2_INDEX_SHIFT) + (codePoint & exports.UTRIE2_DATA_MASK);
+                return this.data[ix];
+            }
+            if (codePoint <= 0xffff) {
+                // Lead Surrogate Code Point.  A Separate index section is stored for
+                // lead surrogate code units and code points.
+                //   The main index has the code unit data.
+                //   For this function, we need the code point data.
+                // Note: this expression could be refactored for slightly improved efficiency, but
+                //       surrogate code points will be so rare in practice that it's not worth it.
+                ix = this.index[exports.UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> exports.UTRIE2_SHIFT_2)];
+                ix = (ix << exports.UTRIE2_INDEX_SHIFT) + (codePoint & exports.UTRIE2_DATA_MASK);
+                return this.data[ix];
+            }
+            if (codePoint < this.highStart) {
+                // Supplemental code point, use two-level lookup.
+                ix = exports.UTRIE2_INDEX_1_OFFSET - exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> exports.UTRIE2_SHIFT_1);
+                ix = this.index[ix];
+                ix += (codePoint >> exports.UTRIE2_SHIFT_2) & exports.UTRIE2_INDEX_2_MASK;
+                ix = this.index[ix];
+                ix = (ix << exports.UTRIE2_INDEX_SHIFT) + (codePoint & exports.UTRIE2_DATA_MASK);
+                return this.data[ix];
+            }
+            if (codePoint <= 0x10ffff) {
+                return this.data[this.highValueIndex];
+            }
+        }
+        // Fall through.  The code point is outside of the legal range of 0..0x10ffff.
+        return this.errorValue;
+    };
+    return Trie;
+}());
+exports.Trie = Trie;
+//# sourceMappingURL=Trie.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/utrie/dist/lib/Trie.js.map


+ 888 - 0
node_modules/utrie/dist/lib/TrieBuilder.js

@@ -0,0 +1,888 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.serializeBase64 = exports.TrieBuilder = exports.BITS_32 = exports.BITS_16 = void 0;
+var Trie_1 = require("./Trie");
+var base64_arraybuffer_1 = require("base64-arraybuffer");
+/**
+ * Trie2 constants, defining shift widths, index array lengths, etc.
+ *
+ * These are needed for the runtime macros but users can treat these as
+ * implementation details and skip to the actual public API further below.
+ */
+// const UTRIE2_OPTIONS_VALUE_BITS_MASK = 0x000f;
+/** Number of code points per index-1 table entry. 2048=0x800 */
+var UTRIE2_CP_PER_INDEX_1_ENTRY = 1 << Trie_1.UTRIE2_SHIFT_1;
+/** The alignment size of a data block. Also the granularity for compaction. */
+var UTRIE2_DATA_GRANULARITY = 1 << Trie_1.UTRIE2_INDEX_SHIFT;
+/* Fixed layout of the first part of the index array. ------------------- */
+/**
+ * The BMP part of the index-2 table is fixed and linear and starts at offset 0.
+ * Length=2048=0x800=0x10000>>UTRIE2_SHIFT_2.
+ */
+var UTRIE2_INDEX_2_OFFSET = 0;
+var UTRIE2_MAX_INDEX_1_LENGTH = 0x100000 >> Trie_1.UTRIE2_SHIFT_1;
+/*
+ * Fixed layout of the first part of the data array. -----------------------
+ * Starts with 4 blocks (128=0x80 entries) for ASCII.
+ */
+/**
+ * The illegal-UTF-8 data block follows the ASCII block, at offset 128=0x80.
+ * Used with linear access for single bytes 0..0xbf for simple error handling.
+ * Length 64=0x40, not UTRIE2_DATA_BLOCK_LENGTH.
+ */
+var UTRIE2_BAD_UTF8_DATA_OFFSET = 0x80;
+/** The start of non-linear-ASCII data blocks, at offset 192=0xc0. */
+var UTRIE2_DATA_START_OFFSET = 0xc0;
+/* Building a Trie2 ---------------------------------------------------------- */
+/*
+ * These definitions are mostly needed by utrie2_builder.c, but also by
+ * utrie2_get32() and utrie2_enum().
+ */
+/*
+ * At build time, leave a gap in the index-2 table,
+ * at least as long as the maximum lengths of the 2-byte UTF-8 index-2 table
+ * and the supplementary index-1 table.
+ * Round up to UTRIE2_INDEX_2_BLOCK_LENGTH for proper compacting.
+ */
+var UNEWTRIE2_INDEX_GAP_OFFSET = Trie_1.UTRIE2_INDEX_2_BMP_LENGTH;
+var UNEWTRIE2_INDEX_GAP_LENGTH = (Trie_1.UTRIE2_UTF8_2B_INDEX_2_LENGTH + UTRIE2_MAX_INDEX_1_LENGTH + Trie_1.UTRIE2_INDEX_2_MASK) & ~Trie_1.UTRIE2_INDEX_2_MASK;
+/**
+ * Maximum length of the build-time index-2 array.
+ * Maximum number of Unicode code points (0x110000) shifted right by UTRIE2_SHIFT_2,
+ * plus the part of the index-2 table for lead surrogate code points,
+ * plus the build-time index gap,
+ * plus the null index-2 block.
+ */
+var UNEWTRIE2_MAX_INDEX_2_LENGTH = (0x110000 >> Trie_1.UTRIE2_SHIFT_2) +
+    Trie_1.UTRIE2_LSCP_INDEX_2_LENGTH +
+    UNEWTRIE2_INDEX_GAP_LENGTH +
+    Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH;
+var UNEWTRIE2_INDEX_1_LENGTH = 0x110000 >> Trie_1.UTRIE2_SHIFT_1;
+/**
+ * Maximum length of the build-time data array.
+ * One entry per 0x110000 code points, plus the illegal-UTF-8 block and the null block,
+ * plus values for the 0x400 surrogate code units.
+ */
+var UNEWTRIE2_MAX_DATA_LENGTH = 0x110000 + 0x40 + 0x40 + 0x400;
+/* Start with allocation of 16k data entries. */
+var UNEWTRIE2_INITIAL_DATA_LENGTH = 1 << 14;
+/* Grow about 8x each time. */
+var UNEWTRIE2_MEDIUM_DATA_LENGTH = 1 << 17;
+/** The null index-2 block, following the gap in the index-2 table. */
+var UNEWTRIE2_INDEX_2_NULL_OFFSET = UNEWTRIE2_INDEX_GAP_OFFSET + UNEWTRIE2_INDEX_GAP_LENGTH;
+/** The start of allocated index-2 blocks. */
+var UNEWTRIE2_INDEX_2_START_OFFSET = UNEWTRIE2_INDEX_2_NULL_OFFSET + Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH;
+/**
+ * The null data block.
+ * Length 64=0x40 even if UTRIE2_DATA_BLOCK_LENGTH is smaller,
+ * to work with 6-bit trail bytes from 2-byte UTF-8.
+ */
+var UNEWTRIE2_DATA_NULL_OFFSET = UTRIE2_DATA_START_OFFSET;
+/** The start of allocated data blocks. */
+var UNEWTRIE2_DATA_START_OFFSET = UNEWTRIE2_DATA_NULL_OFFSET + 0x40;
+/**
+ * The start of data blocks for U+0800 and above.
+ * Below, compaction uses a block length of 64 for 2-byte UTF-8.
+ * From here on, compaction uses UTRIE2_DATA_BLOCK_LENGTH.
+ * Data values for 0x780 code points beyond ASCII.
+ */
+var UNEWTRIE2_DATA_0800_OFFSET = UNEWTRIE2_DATA_START_OFFSET + 0x780;
+/**
+ * Maximum length of the runtime index array.
+ * Limited by its own 16-bit index values, and by uint16_t UTrie2Header.indexLength.
+ * (The actual maximum length is lower,
+ * (0x110000>>UTRIE2_SHIFT_2)+UTRIE2_UTF8_2B_INDEX_2_LENGTH+UTRIE2_MAX_INDEX_1_LENGTH.)
+ */
+var UTRIE2_MAX_INDEX_LENGTH = 0xffff;
+/**
+ * Maximum length of the runtime data array.
+ * Limited by 16-bit index values that are left-shifted by UTRIE2_INDEX_SHIFT,
+ * and by uint16_t UTrie2Header.shiftedDataLength.
+ */
+var UTRIE2_MAX_DATA_LENGTH = 0xffff << Trie_1.UTRIE2_INDEX_SHIFT;
+exports.BITS_16 = 16;
+exports.BITS_32 = 32;
+var isHighSurrogate = function (c) { return c >= 0xd800 && c <= 0xdbff; };
+var equalInt = function (a, s, t, length) {
+    for (var i = 0; i < length; i++) {
+        if (a[s + i] !== a[t + i]) {
+            return false;
+        }
+    }
+    return true;
+};
+var TrieBuilder = /** @class */ (function () {
+    function TrieBuilder(initialValue, errorValue) {
+        if (initialValue === void 0) { initialValue = 0; }
+        if (errorValue === void 0) { errorValue = 0; }
+        this.initialValue = initialValue;
+        this.errorValue = errorValue;
+        this.highStart = 0x110000;
+        this.data = new Uint32Array(UNEWTRIE2_INITIAL_DATA_LENGTH);
+        this.dataCapacity = UNEWTRIE2_INITIAL_DATA_LENGTH;
+        this.highStart = 0x110000;
+        this.firstFreeBlock = 0; /* no free block in the list */
+        this.isCompacted = false;
+        this.index1 = new Uint32Array(UNEWTRIE2_INDEX_1_LENGTH);
+        this.index2 = new Uint32Array(UNEWTRIE2_MAX_INDEX_2_LENGTH);
+        /*
+         * Multi-purpose per-data-block table.
+         *
+         * Before compacting:
+         *
+         * Per-data-block reference counters/free-block list.
+         *  0: unused
+         * >0: reference counter (number of index-2 entries pointing here)
+         * <0: next free data block in free-block list
+         *
+         * While compacting:
+         *
+         * Map of adjusted indexes, used in compactData() and compactIndex2().
+         * Maps from original indexes to new ones.
+         */
+        this.map = new Uint32Array(UNEWTRIE2_MAX_DATA_LENGTH >> Trie_1.UTRIE2_SHIFT_2);
+        /*
+         * preallocate and reset
+         * - ASCII
+         * - the bad-UTF-8-data block
+         * - the null data block
+         */
+        var i, j;
+        for (i = 0; i < 0x80; ++i) {
+            this.data[i] = initialValue;
+        }
+        for (; i < 0xc0; ++i) {
+            this.data[i] = errorValue;
+        }
+        for (i = UNEWTRIE2_DATA_NULL_OFFSET; i < UNEWTRIE2_DATA_START_OFFSET; ++i) {
+            this.data[i] = initialValue;
+        }
+        this.dataNullOffset = UNEWTRIE2_DATA_NULL_OFFSET;
+        this.dataLength = UNEWTRIE2_DATA_START_OFFSET;
+        /* set the index-2 indexes for the 2=0x80>>UTRIE2_SHIFT_2 ASCII data blocks */
+        for (i = 0, j = 0; j < 0x80; ++i, j += Trie_1.UTRIE2_DATA_BLOCK_LENGTH) {
+            this.index2[i] = j;
+            this.map[i] = 1;
+        }
+        /* reference counts for the bad-UTF-8-data block */
+        for (; j < 0xc0; ++i, j += Trie_1.UTRIE2_DATA_BLOCK_LENGTH) {
+            this.map[i] = 0;
+        }
+        /*
+         * Reference counts for the null data block: all blocks except for the ASCII blocks.
+         * Plus 1 so that we don't drop this block during compaction.
+         * Plus as many as needed for lead surrogate code points.
+         */
+        /* i==newTrie->dataNullOffset */
+        this.map[i++] = (0x110000 >> Trie_1.UTRIE2_SHIFT_2) - (0x80 >> Trie_1.UTRIE2_SHIFT_2) + 1 + Trie_1.UTRIE2_LSCP_INDEX_2_LENGTH;
+        j += Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+        for (; j < UNEWTRIE2_DATA_START_OFFSET; ++i, j += Trie_1.UTRIE2_DATA_BLOCK_LENGTH) {
+            this.map[i] = 0;
+        }
+        /*
+         * set the remaining indexes in the BMP index-2 block
+         * to the null data block
+         */
+        for (i = 0x80 >> Trie_1.UTRIE2_SHIFT_2; i < Trie_1.UTRIE2_INDEX_2_BMP_LENGTH; ++i) {
+            this.index2[i] = UNEWTRIE2_DATA_NULL_OFFSET;
+        }
+        /*
+         * Fill the index gap with impossible values so that compaction
+         * does not overlap other index-2 blocks with the gap.
+         */
+        for (i = 0; i < UNEWTRIE2_INDEX_GAP_LENGTH; ++i) {
+            this.index2[UNEWTRIE2_INDEX_GAP_OFFSET + i] = -1;
+        }
+        /* set the indexes in the null index-2 block */
+        for (i = 0; i < Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH; ++i) {
+            this.index2[UNEWTRIE2_INDEX_2_NULL_OFFSET + i] = UNEWTRIE2_DATA_NULL_OFFSET;
+        }
+        this.index2NullOffset = UNEWTRIE2_INDEX_2_NULL_OFFSET;
+        this.index2Length = UNEWTRIE2_INDEX_2_START_OFFSET;
+        /* set the index-1 indexes for the linear index-2 block */
+        for (i = 0, j = 0; i < Trie_1.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH; ++i, j += Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH) {
+            this.index1[i] = j;
+        }
+        /* set the remaining index-1 indexes to the null index-2 block */
+        for (; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {
+            this.index1[i] = UNEWTRIE2_INDEX_2_NULL_OFFSET;
+        }
+        /*
+         * Preallocate and reset data for U+0080..U+07ff,
+         * for 2-byte UTF-8 which will be compacted in 64-blocks
+         * even if UTRIE2_DATA_BLOCK_LENGTH is smaller.
+         */
+        for (i = 0x80; i < 0x800; i += Trie_1.UTRIE2_DATA_BLOCK_LENGTH) {
+            this.set(i, initialValue);
+        }
+    }
+    /**
+     * Set a value for a code point.
+     *
+     * @param c the code point
+     * @param value the value
+     */
+    TrieBuilder.prototype.set = function (c, value) {
+        if (c < 0 || c > 0x10ffff) {
+            throw new Error('Invalid code point.');
+        }
+        this._set(c, true, value);
+        return this;
+    };
+    /**
+     * Set a value in a range of code points [start..end].
+     * All code points c with start<=c<=end will get the value if
+     * overwrite is TRUE or if the old value is the initial value.
+     *
+     * @param start the first code point to get the value
+     * @param end the last code point to get the value (inclusive)
+     * @param value the value
+     * @param overwrite flag for whether old non-initial values are to be overwritten
+     */
+    TrieBuilder.prototype.setRange = function (start, end, value, overwrite) {
+        if (overwrite === void 0) { overwrite = false; }
+        /*
+         * repeat value in [start..end]
+         * mark index values for repeat-data blocks by setting bit 31 of the index values
+         * fill around existing values if any, if(overwrite)
+         */
+        var block, rest, repeatBlock;
+        if (start > 0x10ffff || start < 0 || end > 0x10ffff || end < 0 || start > end) {
+            throw new Error('Invalid code point range.');
+        }
+        if (!overwrite && value === this.initialValue) {
+            return this; /* nothing to do */
+        }
+        if (this.isCompacted) {
+            throw new Error('Trie was already compacted');
+        }
+        var limit = end + 1;
+        if ((start & Trie_1.UTRIE2_DATA_MASK) !== 0) {
+            /* set partial block at [start..following block boundary[ */
+            block = this.getDataBlock(start, true);
+            var nextStart = (start + Trie_1.UTRIE2_DATA_BLOCK_LENGTH) & ~Trie_1.UTRIE2_DATA_MASK;
+            if (nextStart <= limit) {
+                this.fillBlock(block, start & Trie_1.UTRIE2_DATA_MASK, Trie_1.UTRIE2_DATA_BLOCK_LENGTH, value, this.initialValue, overwrite);
+                start = nextStart;
+            }
+            else {
+                this.fillBlock(block, start & Trie_1.UTRIE2_DATA_MASK, limit & Trie_1.UTRIE2_DATA_MASK, value, this.initialValue, overwrite);
+                return this;
+            }
+        }
+        /* number of positions in the last, partial block */
+        rest = limit & Trie_1.UTRIE2_DATA_MASK;
+        /* round down limit to a block boundary */
+        limit &= ~Trie_1.UTRIE2_DATA_MASK;
+        /* iterate over all-value blocks */
+        repeatBlock = value === this.initialValue ? this.dataNullOffset : -1;
+        while (start < limit) {
+            var i2 = void 0;
+            var setRepeatBlock = false;
+            if (value === this.initialValue && this.isInNullBlock(start, true)) {
+                start += Trie_1.UTRIE2_DATA_BLOCK_LENGTH; /* nothing to do */
+                continue;
+            }
+            /* get index value */
+            i2 = this.getIndex2Block(start, true);
+            i2 += (start >> Trie_1.UTRIE2_SHIFT_2) & Trie_1.UTRIE2_INDEX_2_MASK;
+            block = this.index2[i2];
+            if (this.isWritableBlock(block)) {
+                /* already allocated */
+                if (overwrite && block >= UNEWTRIE2_DATA_0800_OFFSET) {
+                    /*
+                     * We overwrite all values, and it's not a
+                     * protected (ASCII-linear or 2-byte UTF-8) block:
+                     * replace with the repeatBlock.
+                     */
+                    setRepeatBlock = true;
+                }
+                else {
+                    /* !overwrite, or protected block: just write the values into this block */
+                    this.fillBlock(block, 0, Trie_1.UTRIE2_DATA_BLOCK_LENGTH, value, this.initialValue, overwrite);
+                }
+            }
+            else if (this.data[block] !== value && (overwrite || block === this.dataNullOffset)) {
+                /*
+                 * Set the repeatBlock instead of the null block or previous repeat block:
+                 *
+                 * If !isWritableBlock() then all entries in the block have the same value
+                 * because it's the null block or a range block (the repeatBlock from a previous
+                 * call to utrie2_setRange32()).
+                 * No other blocks are used multiple times before compacting.
+                 *
+                 * The null block is the only non-writable block with the initialValue because
+                 * of the repeatBlock initialization above. (If value==initialValue, then
+                 * the repeatBlock will be the null data block.)
+                 *
+                 * We set our repeatBlock if the desired value differs from the block's value,
+                 * and if we overwrite any data or if the data is all initial values
+                 * (which is the same as the block being the null block, see above).
+                 */
+                setRepeatBlock = true;
+            }
+            if (setRepeatBlock) {
+                if (repeatBlock >= 0) {
+                    this.setIndex2Entry(i2, repeatBlock);
+                }
+                else {
+                    /* create and set and fill the repeatBlock */
+                    repeatBlock = this.getDataBlock(start, true);
+                    this.writeBlock(repeatBlock, value);
+                }
+            }
+            start += Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+        }
+        if (rest > 0) {
+            /* set partial block at [last block boundary..limit[ */
+            block = this.getDataBlock(start, true);
+            this.fillBlock(block, 0, rest, value, this.initialValue, overwrite);
+        }
+        return this;
+    };
+    /**
+     * Get the value for a code point as stored in the Trie2.
+     *
+     * @param codePoint the code point
+     * @return the value
+     */
+    TrieBuilder.prototype.get = function (codePoint) {
+        if (codePoint < 0 || codePoint > 0x10ffff) {
+            return this.errorValue;
+        }
+        else {
+            return this._get(codePoint, true);
+        }
+    };
+    TrieBuilder.prototype._get = function (c, fromLSCP) {
+        var i2;
+        if (c >= this.highStart && (!(c >= 0xd800 && c < 0xdc00) || fromLSCP)) {
+            return this.data[this.dataLength - UTRIE2_DATA_GRANULARITY];
+        }
+        if (c >= 0xd800 && c < 0xdc00 && fromLSCP) {
+            i2 = Trie_1.UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> Trie_1.UTRIE2_SHIFT_2) + (c >> Trie_1.UTRIE2_SHIFT_2);
+        }
+        else {
+            i2 = this.index1[c >> Trie_1.UTRIE2_SHIFT_1] + ((c >> Trie_1.UTRIE2_SHIFT_2) & Trie_1.UTRIE2_INDEX_2_MASK);
+        }
+        var block = this.index2[i2];
+        return this.data[block + (c & Trie_1.UTRIE2_DATA_MASK)];
+    };
+    TrieBuilder.prototype.freeze = function (valueBits) {
+        if (valueBits === void 0) { valueBits = exports.BITS_32; }
+        var i;
+        var allIndexesLength;
+        var dataMove; /* >0 if the data is moved to the end of the index array */
+        /* compact if necessary */
+        if (!this.isCompacted) {
+            this.compactTrie();
+        }
+        allIndexesLength = this.highStart <= 0x10000 ? Trie_1.UTRIE2_INDEX_1_OFFSET : this.index2Length;
+        if (valueBits === exports.BITS_16) {
+            // dataMove = allIndexesLength;
+            dataMove = 0;
+        }
+        else {
+            dataMove = 0;
+        }
+        /* are indexLength and dataLength within limits? */
+        if (
+        /* for unshifted indexLength */
+        allIndexesLength > UTRIE2_MAX_INDEX_LENGTH ||
+            /* for unshifted dataNullOffset */
+            dataMove + this.dataNullOffset > 0xffff ||
+            /* for unshifted 2-byte UTF-8 index-2 values */
+            dataMove + UNEWTRIE2_DATA_0800_OFFSET > 0xffff ||
+            /* for shiftedDataLength */
+            dataMove + this.dataLength > UTRIE2_MAX_DATA_LENGTH) {
+            throw new Error('Trie data is too large.');
+        }
+        var index = new Uint16Array(allIndexesLength);
+        /* write the index-2 array values shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove */
+        var destIdx = 0;
+        for (i = 0; i < Trie_1.UTRIE2_INDEX_2_BMP_LENGTH; i++) {
+            index[destIdx++] = (this.index2[i] + dataMove) >> Trie_1.UTRIE2_INDEX_SHIFT;
+        }
+        /* write UTF-8 2-byte index-2 values, not right-shifted */
+        for (i = 0; i < 0xc2 - 0xc0; ++i) {
+            /* C0..C1 */
+            index[destIdx++] = dataMove + UTRIE2_BAD_UTF8_DATA_OFFSET;
+        }
+        for (; i < 0xe0 - 0xc0; ++i) {
+            /* C2..DF */
+            index[destIdx++] = dataMove + this.index2[i << (6 - Trie_1.UTRIE2_SHIFT_2)];
+        }
+        if (this.highStart > 0x10000) {
+            var index1Length = (this.highStart - 0x10000) >> Trie_1.UTRIE2_SHIFT_1;
+            var index2Offset = Trie_1.UTRIE2_INDEX_2_BMP_LENGTH + Trie_1.UTRIE2_UTF8_2B_INDEX_2_LENGTH + index1Length;
+            /* write 16-bit index-1 values for supplementary code points */
+            for (i = 0; i < index1Length; i++) {
+                index[destIdx++] = UTRIE2_INDEX_2_OFFSET + this.index1[i + Trie_1.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH];
+            }
+            /*
+             * write the index-2 array values for supplementary code points,
+             * shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove
+             */
+            for (i = 0; i < this.index2Length - index2Offset; i++) {
+                index[destIdx++] = (dataMove + this.index2[index2Offset + i]) >> Trie_1.UTRIE2_INDEX_SHIFT;
+            }
+        }
+        /* write the 16/32-bit data array */
+        switch (valueBits) {
+            case exports.BITS_16:
+                /* write 16-bit data values */
+                var data16 = new Uint16Array(this.dataLength);
+                for (i = 0; i < this.dataLength; i++) {
+                    data16[i] = this.data[i];
+                }
+                return new Trie_1.Trie(this.initialValue, this.errorValue, this.highStart, dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY, index, data16);
+            case exports.BITS_32:
+                /* write 32-bit data values */
+                var data32 = new Uint32Array(this.dataLength);
+                for (i = 0; i < this.dataLength; i++) {
+                    data32[i] = this.data[i];
+                }
+                return new Trie_1.Trie(this.initialValue, this.errorValue, this.highStart, dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY, index, data32);
+            default:
+                throw new Error('Bits should be either 16 or 32');
+        }
+    };
+    /*
+     * Find the start of the last range in the trie by enumerating backward.
+     * Indexes for supplementary code points higher than this will be omitted.
+     */
+    TrieBuilder.prototype.findHighStart = function (highValue) {
+        var value;
+        var i2, j, i2Block, prevI2Block, block, prevBlock;
+        /* set variables for previous range */
+        if (highValue === this.initialValue) {
+            prevI2Block = this.index2NullOffset;
+            prevBlock = this.dataNullOffset;
+        }
+        else {
+            prevI2Block = -1;
+            prevBlock = -1;
+        }
+        var prev = 0x110000;
+        /* enumerate index-2 blocks */
+        var i1 = UNEWTRIE2_INDEX_1_LENGTH;
+        var c = prev;
+        while (c > 0) {
+            i2Block = this.index1[--i1];
+            if (i2Block === prevI2Block) {
+                /* the index-2 block is the same as the previous one, and filled with highValue */
+                c -= UTRIE2_CP_PER_INDEX_1_ENTRY;
+                continue;
+            }
+            prevI2Block = i2Block;
+            if (i2Block === this.index2NullOffset) {
+                /* this is the null index-2 block */
+                if (highValue !== this.initialValue) {
+                    return c;
+                }
+                c -= UTRIE2_CP_PER_INDEX_1_ENTRY;
+            }
+            else {
+                /* enumerate data blocks for one index-2 block */
+                for (i2 = Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH; i2 > 0;) {
+                    block = this.index2[i2Block + --i2];
+                    if (block === prevBlock) {
+                        /* the block is the same as the previous one, and filled with highValue */
+                        c -= Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+                        continue;
+                    }
+                    prevBlock = block;
+                    if (block === this.dataNullOffset) {
+                        /* this is the null data block */
+                        if (highValue !== this.initialValue) {
+                            return c;
+                        }
+                        c -= Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+                    }
+                    else {
+                        for (j = Trie_1.UTRIE2_DATA_BLOCK_LENGTH; j > 0;) {
+                            value = this.data[block + --j];
+                            if (value !== highValue) {
+                                return c;
+                            }
+                            --c;
+                        }
+                    }
+                }
+            }
+        }
+        /* deliver last range */
+        return 0;
+    };
+    /*
+     * Compact a build-time trie.
+     *
+     * The compaction
+     * - removes blocks that are identical with earlier ones
+     * - overlaps adjacent blocks as much as possible (if overlap==TRUE)
+     * - moves blocks in steps of the data granularity
+     * - moves and overlaps blocks that overlap with multiple values in the overlap region
+     *
+     * It does not
+     * - try to move and overlap blocks that are not already adjacent
+     */
+    TrieBuilder.prototype.compactData = function () {
+        var start, movedStart;
+        var blockLength, overlap;
+        var i, mapIndex, blockCount;
+        /* do not compact linear-ASCII data */
+        var newStart = UTRIE2_DATA_START_OFFSET;
+        for (start = 0, i = 0; start < newStart; start += Trie_1.UTRIE2_DATA_BLOCK_LENGTH, ++i) {
+            this.map[i] = start;
+        }
+        /*
+         * Start with a block length of 64 for 2-byte UTF-8,
+         * then switch to UTRIE2_DATA_BLOCK_LENGTH.
+         */
+        blockLength = 64;
+        blockCount = blockLength >> Trie_1.UTRIE2_SHIFT_2;
+        for (start = newStart; start < this.dataLength;) {
+            /*
+             * start: index of first entry of current block
+             * newStart: index where the current block is to be moved
+             *           (right after current end of already-compacted data)
+             */
+            if (start === UNEWTRIE2_DATA_0800_OFFSET) {
+                blockLength = Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+                blockCount = 1;
+            }
+            /* skip blocks that are not used */
+            if (this.map[start >> Trie_1.UTRIE2_SHIFT_2] <= 0) {
+                /* advance start to the next block */
+                start += blockLength;
+                /* leave newStart with the previous block! */
+                continue;
+            }
+            /* search for an identical block */
+            movedStart = this.findSameDataBlock(newStart, start, blockLength);
+            if (movedStart >= 0) {
+                /* found an identical block, set the other block's index value for the current block */
+                for (i = blockCount, mapIndex = start >> Trie_1.UTRIE2_SHIFT_2; i > 0; --i) {
+                    this.map[mapIndex++] = movedStart;
+                    movedStart += Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+                }
+                /* advance start to the next block */
+                start += blockLength;
+                /* leave newStart with the previous block! */
+                continue;
+            }
+            /* see if the beginning of this block can be overlapped with the end of the previous block */
+            /* look for maximum overlap (modulo granularity) with the previous, adjacent block */
+            for (overlap = blockLength - UTRIE2_DATA_GRANULARITY; overlap > 0 && !equalInt(this.data, newStart - overlap, start, overlap); overlap -= UTRIE2_DATA_GRANULARITY) { }
+            if (overlap > 0 || newStart < start) {
+                /* some overlap, or just move the whole block */
+                movedStart = newStart - overlap;
+                for (i = blockCount, mapIndex = start >> Trie_1.UTRIE2_SHIFT_2; i > 0; --i) {
+                    this.map[mapIndex++] = movedStart;
+                    movedStart += Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+                }
+                /* move the non-overlapping indexes to their new positions */
+                start += overlap;
+                for (i = blockLength - overlap; i > 0; --i) {
+                    this.data[newStart++] = this.data[start++];
+                }
+            }
+            else {
+                /* no overlap && newStart==start */
+                for (i = blockCount, mapIndex = start >> Trie_1.UTRIE2_SHIFT_2; i > 0; --i) {
+                    this.map[mapIndex++] = start;
+                    start += Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+                }
+                newStart = start;
+            }
+        }
+        /* now adjust the index-2 table */
+        for (i = 0; i < this.index2Length; ++i) {
+            if (i === UNEWTRIE2_INDEX_GAP_OFFSET) {
+                /* Gap indexes are invalid (-1). Skip over the gap. */
+                i += UNEWTRIE2_INDEX_GAP_LENGTH;
+            }
+            this.index2[i] = this.map[this.index2[i] >> Trie_1.UTRIE2_SHIFT_2];
+        }
+        this.dataNullOffset = this.map[this.dataNullOffset >> Trie_1.UTRIE2_SHIFT_2];
+        /* ensure dataLength alignment */
+        while ((newStart & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {
+            this.data[newStart++] = this.initialValue;
+        }
+        this.dataLength = newStart;
+    };
+    TrieBuilder.prototype.findSameDataBlock = function (dataLength, otherBlock, blockLength) {
+        var block = 0;
+        /* ensure that we do not even partially get past dataLength */
+        dataLength -= blockLength;
+        for (; block <= dataLength; block += UTRIE2_DATA_GRANULARITY) {
+            if (equalInt(this.data, block, otherBlock, blockLength)) {
+                return block;
+            }
+        }
+        return -1;
+    };
+    TrieBuilder.prototype.compactTrie = function () {
+        var highValue = this.get(0x10ffff);
+        /* find highStart and round it up */
+        var localHighStart = this.findHighStart(highValue);
+        localHighStart = (localHighStart + (UTRIE2_CP_PER_INDEX_1_ENTRY - 1)) & ~(UTRIE2_CP_PER_INDEX_1_ENTRY - 1);
+        if (localHighStart === 0x110000) {
+            highValue = this.errorValue;
+        }
+        /*
+         * Set trie->highStart only after utrie2_get32(trie, highStart).
+         * Otherwise utrie2_get32(trie, highStart) would try to read the highValue.
+         */
+        this.highStart = localHighStart;
+        if (this.highStart < 0x110000) {
+            /* Blank out [highStart..10ffff] to release associated data blocks. */
+            var suppHighStart = this.highStart <= 0x10000 ? 0x10000 : this.highStart;
+            this.setRange(suppHighStart, 0x10ffff, this.initialValue, true);
+        }
+        this.compactData();
+        if (this.highStart > 0x10000) {
+            this.compactIndex2();
+        }
+        /*
+         * Store the highValue in the data array and round up the dataLength.
+         * Must be done after compactData() because that assumes that dataLength
+         * is a multiple of UTRIE2_DATA_BLOCK_LENGTH.
+         */
+        this.data[this.dataLength++] = highValue;
+        while ((this.dataLength & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {
+            this.data[this.dataLength++] = this.initialValue;
+        }
+        this.isCompacted = true;
+    };
+    TrieBuilder.prototype.compactIndex2 = function () {
+        var i, start, movedStart, overlap;
+        /* do not compact linear-BMP index-2 blocks */
+        var newStart = Trie_1.UTRIE2_INDEX_2_BMP_LENGTH;
+        for (start = 0, i = 0; start < newStart; start += Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH, ++i) {
+            this.map[i] = start;
+        }
+        /* Reduce the index table gap to what will be needed at runtime. */
+        newStart += Trie_1.UTRIE2_UTF8_2B_INDEX_2_LENGTH + ((this.highStart - 0x10000) >> Trie_1.UTRIE2_SHIFT_1);
+        for (start = UNEWTRIE2_INDEX_2_NULL_OFFSET; start < this.index2Length;) {
+            /*
+             * start: index of first entry of current block
+             * newStart: index where the current block is to be moved
+             *           (right after current end of already-compacted data)
+             */
+            /* search for an identical block */
+            if ((movedStart = this.findSameIndex2Block(newStart, start)) >= 0) {
+                /* found an identical block, set the other block's index value for the current block */
+                this.map[start >> Trie_1.UTRIE2_SHIFT_1_2] = movedStart;
+                /* advance start to the next block */
+                start += Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH;
+                /* leave newStart with the previous block! */
+                continue;
+            }
+            /* see if the beginning of this block can be overlapped with the end of the previous block */
+            /* look for maximum overlap with the previous, adjacent block */
+            for (overlap = Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH - 1; overlap > 0 && !equalInt(this.index2, newStart - overlap, start, overlap); --overlap) { }
+            if (overlap > 0 || newStart < start) {
+                /* some overlap, or just move the whole block */
+                this.map[start >> Trie_1.UTRIE2_SHIFT_1_2] = newStart - overlap;
+                /* move the non-overlapping indexes to their new positions */
+                start += overlap;
+                for (i = Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH - overlap; i > 0; --i) {
+                    this.index2[newStart++] = this.index2[start++];
+                }
+            }
+            else {
+                /* no overlap && newStart==start */ this.map[start >> Trie_1.UTRIE2_SHIFT_1_2] = start;
+                start += Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH;
+                newStart = start;
+            }
+        }
+        /* now adjust the index-1 table */
+        for (i = 0; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {
+            this.index1[i] = this.map[this.index1[i] >> Trie_1.UTRIE2_SHIFT_1_2];
+        }
+        this.index2NullOffset = this.map[this.index2NullOffset >> Trie_1.UTRIE2_SHIFT_1_2];
+        /*
+         * Ensure data table alignment:
+         * Needs to be granularity-aligned for 16-bit trie
+         * (so that dataMove will be down-shiftable),
+         * and 2-aligned for uint32_t data.
+         */
+        while ((newStart & ((UTRIE2_DATA_GRANULARITY - 1) | 1)) !== 0) {
+            /* Arbitrary value: 0x3fffc not possible for real data. */
+            this.index2[newStart++] = 0x0000ffff << Trie_1.UTRIE2_INDEX_SHIFT;
+        }
+        this.index2Length = newStart;
+    };
+    TrieBuilder.prototype.findSameIndex2Block = function (index2Length, otherBlock) {
+        /* ensure that we do not even partially get past index2Length */
+        index2Length -= Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH;
+        for (var block = 0; block <= index2Length; ++block) {
+            if (equalInt(this.index2, block, otherBlock, Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH)) {
+                return block;
+            }
+        }
+        return -1;
+    };
+    TrieBuilder.prototype._set = function (c, forLSCP, value) {
+        if (this.isCompacted) {
+            throw new Error('Trie was already compacted');
+        }
+        var block = this.getDataBlock(c, forLSCP);
+        this.data[block + (c & Trie_1.UTRIE2_DATA_MASK)] = value;
+        return this;
+    };
+    TrieBuilder.prototype.writeBlock = function (block, value) {
+        var limit = block + Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+        while (block < limit) {
+            this.data[block++] = value;
+        }
+    };
+    TrieBuilder.prototype.isInNullBlock = function (c, forLSCP) {
+        var i2 = isHighSurrogate(c) && forLSCP
+            ? Trie_1.UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> Trie_1.UTRIE2_SHIFT_2) + (c >> Trie_1.UTRIE2_SHIFT_2)
+            : this.index1[c >> Trie_1.UTRIE2_SHIFT_1] + ((c >> Trie_1.UTRIE2_SHIFT_2) & Trie_1.UTRIE2_INDEX_2_MASK);
+        var block = this.index2[i2];
+        return block === this.dataNullOffset;
+    };
+    TrieBuilder.prototype.fillBlock = function (block, start, limit, value, initialValue, overwrite) {
+        var pLimit = block + limit;
+        if (overwrite) {
+            for (var i = block + start; i < pLimit; i++) {
+                this.data[i] = value;
+            }
+        }
+        else {
+            for (var i = block + start; i < pLimit; i++) {
+                if (this.data[i] === initialValue) {
+                    this.data[i] = value;
+                }
+            }
+        }
+    };
+    TrieBuilder.prototype.setIndex2Entry = function (i2, block) {
+        ++this.map[block >> Trie_1.UTRIE2_SHIFT_2]; /* increment first, in case block==oldBlock! */
+        var oldBlock = this.index2[i2];
+        if (0 === --this.map[oldBlock >> Trie_1.UTRIE2_SHIFT_2]) {
+            this.releaseDataBlock(oldBlock);
+        }
+        this.index2[i2] = block;
+    };
+    TrieBuilder.prototype.releaseDataBlock = function (block) {
+        /* put this block at the front of the free-block chain */
+        this.map[block >> Trie_1.UTRIE2_SHIFT_2] = -this.firstFreeBlock;
+        this.firstFreeBlock = block;
+    };
+    TrieBuilder.prototype.getDataBlock = function (c, forLSCP) {
+        var i2 = this.getIndex2Block(c, forLSCP);
+        i2 += (c >> Trie_1.UTRIE2_SHIFT_2) & Trie_1.UTRIE2_INDEX_2_MASK;
+        var oldBlock = this.index2[i2];
+        if (this.isWritableBlock(oldBlock)) {
+            return oldBlock;
+        }
+        /* allocate a new data block */
+        var newBlock = this.allocDataBlock(oldBlock);
+        this.setIndex2Entry(i2, newBlock);
+        return newBlock;
+    };
+    TrieBuilder.prototype.isWritableBlock = function (block) {
+        return block !== this.dataNullOffset && 1 === this.map[block >> Trie_1.UTRIE2_SHIFT_2];
+    };
+    TrieBuilder.prototype.getIndex2Block = function (c, forLSCP) {
+        if (c >= 0xd800 && c < 0xdc00 && forLSCP) {
+            return Trie_1.UTRIE2_LSCP_INDEX_2_OFFSET;
+        }
+        var i1 = c >> Trie_1.UTRIE2_SHIFT_1;
+        var i2 = this.index1[i1];
+        if (i2 === this.index2NullOffset) {
+            i2 = this.allocIndex2Block();
+            this.index1[i1] = i2;
+        }
+        return i2;
+    };
+    TrieBuilder.prototype.allocDataBlock = function (copyBlock) {
+        var newBlock;
+        if (this.firstFreeBlock !== 0) {
+            /* get the first free block */
+            newBlock = this.firstFreeBlock;
+            this.firstFreeBlock = -this.map[newBlock >> Trie_1.UTRIE2_SHIFT_2];
+        }
+        else {
+            /* get a new block from the high end */
+            newBlock = this.dataLength;
+            var newTop = newBlock + Trie_1.UTRIE2_DATA_BLOCK_LENGTH;
+            if (newTop > this.dataCapacity) {
+                var capacity = void 0;
+                /* out of memory in the data array */
+                if (this.dataCapacity < UNEWTRIE2_MEDIUM_DATA_LENGTH) {
+                    capacity = UNEWTRIE2_MEDIUM_DATA_LENGTH;
+                }
+                else if (this.dataCapacity < UNEWTRIE2_MAX_DATA_LENGTH) {
+                    capacity = UNEWTRIE2_MAX_DATA_LENGTH;
+                }
+                else {
+                    /*
+                     * Should never occur.
+                     * Either UNEWTRIE2_MAX_DATA_LENGTH is incorrect,
+                     * or the code writes more values than should be possible.
+                     */
+                    throw new Error('Internal error in Trie creation.');
+                }
+                var newData = new Uint32Array(capacity);
+                newData.set(this.data.subarray(0, this.dataLength));
+                this.data = newData;
+                this.dataCapacity = capacity;
+            }
+            this.dataLength = newTop;
+        }
+        this.data.set(this.data.subarray(copyBlock, copyBlock + Trie_1.UTRIE2_DATA_BLOCK_LENGTH), newBlock);
+        this.map[newBlock >> Trie_1.UTRIE2_SHIFT_2] = 0;
+        return newBlock;
+    };
+    TrieBuilder.prototype.allocIndex2Block = function () {
+        var newBlock = this.index2Length;
+        var newTop = newBlock + Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH;
+        if (newTop > this.index2.length) {
+            throw new Error('Internal error in Trie creation.');
+            /*
+             * Should never occur.
+             * Either UTRIE2_MAX_BUILD_TIME_INDEX_LENGTH is incorrect,
+             * or the code writes more values than should be possible.
+             */
+        }
+        this.index2Length = newTop;
+        this.index2.set(this.index2.subarray(this.index2NullOffset, this.index2NullOffset + Trie_1.UTRIE2_INDEX_2_BLOCK_LENGTH), newBlock);
+        return newBlock;
+    };
+    return TrieBuilder;
+}());
+exports.TrieBuilder = TrieBuilder;
+var serializeBase64 = function (trie) {
+    var index = trie.index;
+    var data = trie.data;
+    if (!(index instanceof Uint16Array) || !(data instanceof Uint16Array || data instanceof Uint32Array)) {
+        throw new Error('TrieBuilder serializer only support TypedArrays');
+    }
+    var headerLength = Uint32Array.BYTES_PER_ELEMENT * 6;
+    var bufferLength = headerLength + index.byteLength + data.byteLength;
+    var buffer = new ArrayBuffer(Math.ceil(bufferLength / 4) * 4);
+    var view32 = new Uint32Array(buffer);
+    var view16 = new Uint16Array(buffer);
+    view32[0] = trie.initialValue;
+    view32[1] = trie.errorValue;
+    view32[2] = trie.highStart;
+    view32[3] = trie.highValueIndex;
+    view32[4] = index.byteLength;
+    // $FlowFixMe
+    view32[5] = data.BYTES_PER_ELEMENT;
+    view16.set(index, headerLength / Uint16Array.BYTES_PER_ELEMENT);
+    if (data.BYTES_PER_ELEMENT === Uint16Array.BYTES_PER_ELEMENT) {
+        view16.set(data, (headerLength + index.byteLength) / Uint16Array.BYTES_PER_ELEMENT);
+    }
+    else {
+        view32.set(data, Math.ceil((headerLength + index.byteLength) / Uint32Array.BYTES_PER_ELEMENT));
+    }
+    return [base64_arraybuffer_1.encode(new Uint8Array(buffer)), buffer.byteLength];
+};
+exports.serializeBase64 = serializeBase64;
+//# sourceMappingURL=TrieBuilder.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/utrie/dist/lib/TrieBuilder.js.map


+ 54 - 0
node_modules/utrie/dist/lib/Util.js

@@ -0,0 +1,54 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.polyUint32Array = exports.polyUint16Array = exports.decode = void 0;
+var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+// Use a lookup table to find the index.
+var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+for (var i = 0; i < chars.length; i++) {
+    lookup[chars.charCodeAt(i)] = i;
+}
+var decode = function (base64) {
+    var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
+    if (base64[base64.length - 1] === '=') {
+        bufferLength--;
+        if (base64[base64.length - 2] === '=') {
+            bufferLength--;
+        }
+    }
+    var buffer = typeof ArrayBuffer !== 'undefined' &&
+        typeof Uint8Array !== 'undefined' &&
+        typeof Uint8Array.prototype.slice !== 'undefined'
+        ? new ArrayBuffer(bufferLength)
+        : new Array(bufferLength);
+    var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
+    for (i = 0; i < len; i += 4) {
+        encoded1 = lookup[base64.charCodeAt(i)];
+        encoded2 = lookup[base64.charCodeAt(i + 1)];
+        encoded3 = lookup[base64.charCodeAt(i + 2)];
+        encoded4 = lookup[base64.charCodeAt(i + 3)];
+        bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+        bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+        bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+    }
+    return buffer;
+};
+exports.decode = decode;
+var polyUint16Array = function (buffer) {
+    var length = buffer.length;
+    var bytes = [];
+    for (var i = 0; i < length; i += 2) {
+        bytes.push((buffer[i + 1] << 8) | buffer[i]);
+    }
+    return bytes;
+};
+exports.polyUint16Array = polyUint16Array;
+var polyUint32Array = function (buffer) {
+    var length = buffer.length;
+    var bytes = [];
+    for (var i = 0; i < length; i += 4) {
+        bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);
+    }
+    return bytes;
+};
+exports.polyUint32Array = polyUint32Array;
+//# sourceMappingURL=Util.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/utrie/dist/lib/Util.js.map


+ 10 - 0
node_modules/utrie/dist/lib/index.js

@@ -0,0 +1,10 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.serializeBase64 = exports.TrieBuilder = exports.createTrieFromBase64 = exports.Trie = void 0;
+var Trie_1 = require("./Trie");
+Object.defineProperty(exports, "Trie", { enumerable: true, get: function () { return Trie_1.Trie; } });
+Object.defineProperty(exports, "createTrieFromBase64", { enumerable: true, get: function () { return Trie_1.createTrieFromBase64; } });
+var TrieBuilder_1 = require("./TrieBuilder");
+Object.defineProperty(exports, "TrieBuilder", { enumerable: true, get: function () { return TrieBuilder_1.TrieBuilder; } });
+Object.defineProperty(exports, "serializeBase64", { enumerable: true, get: function () { return TrieBuilder_1.serializeBase64; } });
+//# sourceMappingURL=index.js.map

+ 1 - 0
node_modules/utrie/dist/lib/index.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,+BAAkD;AAA1C,4FAAA,IAAI,OAAA;AAAE,4GAAA,oBAAoB,OAAA;AAClC,6CAA2D;AAAnD,0GAAA,WAAW,OAAA;AAAE,8GAAA,eAAe,OAAA"}

+ 76 - 0
node_modules/utrie/dist/types/Trie.d.ts

@@ -0,0 +1,76 @@
+export declare type int = number;
+/** Shift size for getting the index-2 table offset. */
+export declare const UTRIE2_SHIFT_2 = 5;
+/** Shift size for getting the index-1 table offset. */
+export declare const UTRIE2_SHIFT_1: number;
+/**
+ * Shift size for shifting left the index array values.
+ * Increases possible data size with 16-bit index values at the cost
+ * of compactability.
+ * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
+ */
+export declare const UTRIE2_INDEX_SHIFT = 2;
+/**
+ * Difference between the two shift sizes,
+ * for getting an index-1 offset from an index-2 offset. 6=11-5
+ */
+export declare const UTRIE2_SHIFT_1_2: number;
+/**
+ * The part of the index-2 table for U+D800..U+DBFF stores values for
+ * lead surrogate code _units_ not code _points_.
+ * Values for lead surrogate code _points_ are indexed with this portion of the table.
+ * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
+ */
+export declare const UTRIE2_LSCP_INDEX_2_OFFSET: number;
+/** Number of entries in a data block. 32=0x20 */
+export declare const UTRIE2_DATA_BLOCK_LENGTH: number;
+/** Mask for getting the lower bits for the in-data-block offset. */
+export declare const UTRIE2_DATA_MASK: number;
+export declare const UTRIE2_LSCP_INDEX_2_LENGTH: number;
+/** Count the lengths of both BMP pieces. 2080=0x820 */
+export declare const UTRIE2_INDEX_2_BMP_LENGTH: number;
+/**
+ * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
+ * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
+ */
+export declare const UTRIE2_UTF8_2B_INDEX_2_OFFSET: number;
+export declare const UTRIE2_UTF8_2B_INDEX_2_LENGTH: number;
+/**
+ * The index-1 table, only used for supplementary code points, at offset 2112=0x840.
+ * Variable length, for code points up to highStart, where the last single-value range starts.
+ * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
+ * (For 0x100000 supplementary code points U+10000..U+10ffff.)
+ *
+ * The part of the index-2 table for supplementary code points starts
+ * after this index-1 table.
+ *
+ * Both the index-1 table and the following part of the index-2 table
+ * are omitted completely if there is only BMP data.
+ */
+export declare const UTRIE2_INDEX_1_OFFSET: number;
+/**
+ * Number of index-1 entries for the BMP. 32=0x20
+ * This part of the index-1 table is omitted from the serialized form.
+ */
+export declare const UTRIE2_OMITTED_BMP_INDEX_1_LENGTH: number;
+/** Number of entries in an index-2 block. 64=0x40 */
+export declare const UTRIE2_INDEX_2_BLOCK_LENGTH: number;
+/** Mask for getting the lower bits for the in-index-2-block offset. */
+export declare const UTRIE2_INDEX_2_MASK: number;
+export declare const createTrieFromBase64: (base64: string, _byteLength: number) => Trie;
+export declare class Trie {
+    initialValue: int;
+    errorValue: int;
+    highStart: int;
+    highValueIndex: int;
+    index: Uint16Array | number[];
+    data: Uint32Array | Uint16Array | number[];
+    constructor(initialValue: int, errorValue: int, highStart: int, highValueIndex: int, index: Uint16Array | number[], data: Uint32Array | Uint16Array | number[]);
+    /**
+     * Get the value for a code point as stored in the Trie.
+     *
+     * @param codePoint the code point
+     * @return the value
+     */
+    get(codePoint: number): number;
+}

+ 65 - 0
node_modules/utrie/dist/types/TrieBuilder.d.ts

@@ -0,0 +1,65 @@
+import { Trie, int } from './Trie';
+export declare const BITS_16 = 16;
+export declare const BITS_32 = 32;
+export declare class TrieBuilder {
+    index1: Uint32Array;
+    index2: Uint32Array;
+    map: Uint32Array;
+    data: Uint32Array;
+    dataCapacity: int;
+    initialValue: int;
+    errorValue: int;
+    highStart: int;
+    dataNullOffset: int;
+    dataLength: int;
+    index2NullOffset: int;
+    index2Length: int;
+    firstFreeBlock: int;
+    isCompacted: boolean;
+    constructor(initialValue?: int, errorValue?: int);
+    /**
+     * Set a value for a code point.
+     *
+     * @param c the code point
+     * @param value the value
+     */
+    set(c: int, value: int): TrieBuilder;
+    /**
+     * Set a value in a range of code points [start..end].
+     * All code points c with start<=c<=end will get the value if
+     * overwrite is TRUE or if the old value is the initial value.
+     *
+     * @param start the first code point to get the value
+     * @param end the last code point to get the value (inclusive)
+     * @param value the value
+     * @param overwrite flag for whether old non-initial values are to be overwritten
+     */
+    setRange(start: int, end: int, value: int, overwrite?: boolean): TrieBuilder;
+    /**
+     * Get the value for a code point as stored in the Trie2.
+     *
+     * @param codePoint the code point
+     * @return the value
+     */
+    get(codePoint: int): int;
+    _get(c: int, fromLSCP: boolean): int;
+    freeze(valueBits?: 16 | 32): Trie;
+    findHighStart(highValue: int): int;
+    compactData(): void;
+    findSameDataBlock(dataLength: int, otherBlock: int, blockLength: int): int;
+    compactTrie(): void;
+    compactIndex2(): void;
+    findSameIndex2Block(index2Length: int, otherBlock: int): int;
+    _set(c: int, forLSCP: boolean, value: int): this;
+    writeBlock(block: int, value: int): void;
+    isInNullBlock(c: int, forLSCP: boolean): boolean;
+    fillBlock(block: int, start: int, limit: int, value: int, initialValue: int, overwrite: boolean): void;
+    setIndex2Entry(i2: int, block: int): void;
+    releaseDataBlock(block: int): void;
+    getDataBlock(c: int, forLSCP: boolean): int;
+    isWritableBlock(block: int): boolean;
+    getIndex2Block(c: int, forLSCP: boolean): int;
+    allocDataBlock(copyBlock: int): int;
+    allocIndex2Block(): int;
+}
+export declare const serializeBase64: (trie: Trie) => [string, number];

+ 3 - 0
node_modules/utrie/dist/types/Util.d.ts

@@ -0,0 +1,3 @@
+export declare const decode: (base64: string) => ArrayBuffer | number[];
+export declare const polyUint16Array: (buffer: number[]) => number[];
+export declare const polyUint32Array: (buffer: number[]) => number[];

+ 2 - 0
node_modules/utrie/dist/types/index.d.ts

@@ -0,0 +1,2 @@
+export { Trie, createTrieFromBase64 } from './Trie';
+export { TrieBuilder, serializeBase64 } from './TrieBuilder';

+ 1101 - 0
node_modules/utrie/dist/utrie.es5.js

@@ -0,0 +1,1101 @@
+/*
+ * utrie 1.0.2 <https://github.com/niklasvh/utrie>
+ * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
+ * Released under MIT License
+ */
+var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+// Use a lookup table to find the index.
+var lookup$1 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+for (var i$1 = 0; i$1 < chars$1.length; i$1++) {
+    lookup$1[chars$1.charCodeAt(i$1)] = i$1;
+}
+var decode = function (base64) {
+    var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
+    if (base64[base64.length - 1] === '=') {
+        bufferLength--;
+        if (base64[base64.length - 2] === '=') {
+            bufferLength--;
+        }
+    }
+    var buffer = typeof ArrayBuffer !== 'undefined' &&
+        typeof Uint8Array !== 'undefined' &&
+        typeof Uint8Array.prototype.slice !== 'undefined'
+        ? new ArrayBuffer(bufferLength)
+        : new Array(bufferLength);
+    var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
+    for (i = 0; i < len; i += 4) {
+        encoded1 = lookup$1[base64.charCodeAt(i)];
+        encoded2 = lookup$1[base64.charCodeAt(i + 1)];
+        encoded3 = lookup$1[base64.charCodeAt(i + 2)];
+        encoded4 = lookup$1[base64.charCodeAt(i + 3)];
+        bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+        bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+        bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+    }
+    return buffer;
+};
+var polyUint16Array = function (buffer) {
+    var length = buffer.length;
+    var bytes = [];
+    for (var i = 0; i < length; i += 2) {
+        bytes.push((buffer[i + 1] << 8) | buffer[i]);
+    }
+    return bytes;
+};
+var polyUint32Array = function (buffer) {
+    var length = buffer.length;
+    var bytes = [];
+    for (var i = 0; i < length; i += 4) {
+        bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);
+    }
+    return bytes;
+};
+
+/** Shift size for getting the index-2 table offset. */
+var UTRIE2_SHIFT_2 = 5;
+/** Shift size for getting the index-1 table offset. */
+var UTRIE2_SHIFT_1 = 6 + 5;
+/**
+ * Shift size for shifting left the index array values.
+ * Increases possible data size with 16-bit index values at the cost
+ * of compactability.
+ * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
+ */
+var UTRIE2_INDEX_SHIFT = 2;
+/**
+ * Difference between the two shift sizes,
+ * for getting an index-1 offset from an index-2 offset. 6=11-5
+ */
+var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
+/**
+ * The part of the index-2 table for U+D800..U+DBFF stores values for
+ * lead surrogate code _units_ not code _points_.
+ * Values for lead surrogate code _points_ are indexed with this portion of the table.
+ * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
+ */
+var UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;
+/** Number of entries in a data block. 32=0x20 */
+var UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
+/** Mask for getting the lower bits for the in-data-block offset. */
+var UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
+var UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;
+/** Count the lengths of both BMP pieces. 2080=0x820 */
+var UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
+/**
+ * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
+ * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
+ */
+var UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
+var UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
+/**
+ * The index-1 table, only used for supplementary code points, at offset 2112=0x840.
+ * Variable length, for code points up to highStart, where the last single-value range starts.
+ * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
+ * (For 0x100000 supplementary code points U+10000..U+10ffff.)
+ *
+ * The part of the index-2 table for supplementary code points starts
+ * after this index-1 table.
+ *
+ * Both the index-1 table and the following part of the index-2 table
+ * are omitted completely if there is only BMP data.
+ */
+var UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
+/**
+ * Number of index-1 entries for the BMP. 32=0x20
+ * This part of the index-1 table is omitted from the serialized form.
+ */
+var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;
+/** Number of entries in an index-2 block. 64=0x40 */
+var UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
+/** Mask for getting the lower bits for the in-index-2-block offset. */
+var UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
+var slice16 = function (view, start, end) {
+    if (view.slice) {
+        return view.slice(start, end);
+    }
+    return new Uint16Array(Array.prototype.slice.call(view, start, end));
+};
+var slice32 = function (view, start, end) {
+    if (view.slice) {
+        return view.slice(start, end);
+    }
+    return new Uint32Array(Array.prototype.slice.call(view, start, end));
+};
+var createTrieFromBase64 = function (base64, _byteLength) {
+    var buffer = decode(base64);
+    var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);
+    var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);
+    var headerLength = 24;
+    var index = slice16(view16, headerLength / 2, view32[4] / 2);
+    var data = view32[5] === 2
+        ? slice16(view16, (headerLength + view32[4]) / 2)
+        : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));
+    return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
+};
+var Trie = /** @class */ (function () {
+    function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
+        this.initialValue = initialValue;
+        this.errorValue = errorValue;
+        this.highStart = highStart;
+        this.highValueIndex = highValueIndex;
+        this.index = index;
+        this.data = data;
+    }
+    /**
+     * Get the value for a code point as stored in the Trie.
+     *
+     * @param codePoint the code point
+     * @return the value
+     */
+    Trie.prototype.get = function (codePoint) {
+        var ix;
+        if (codePoint >= 0) {
+            if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {
+                // Ordinary BMP code point, excluding leading surrogates.
+                // BMP uses a single level lookup.  BMP index starts at offset 0 in the Trie2 index.
+                // 16 bit data is stored in the index array itself.
+                ix = this.index[codePoint >> UTRIE2_SHIFT_2];
+                ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
+                return this.data[ix];
+            }
+            if (codePoint <= 0xffff) {
+                // Lead Surrogate Code Point.  A Separate index section is stored for
+                // lead surrogate code units and code points.
+                //   The main index has the code unit data.
+                //   For this function, we need the code point data.
+                // Note: this expression could be refactored for slightly improved efficiency, but
+                //       surrogate code points will be so rare in practice that it's not worth it.
+                ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];
+                ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
+                return this.data[ix];
+            }
+            if (codePoint < this.highStart) {
+                // Supplemental code point, use two-level lookup.
+                ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
+                ix = this.index[ix];
+                ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;
+                ix = this.index[ix];
+                ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
+                return this.data[ix];
+            }
+            if (codePoint <= 0x10ffff) {
+                return this.data[this.highValueIndex];
+            }
+        }
+        // Fall through.  The code point is outside of the legal range of 0..0x10ffff.
+        return this.errorValue;
+    };
+    return Trie;
+}());
+
+/*
+ * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>
+ * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
+ * Released under MIT License
+ */
+var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+// Use a lookup table to find the index.
+var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+for (var i = 0; i < chars.length; i++) {
+    lookup[chars.charCodeAt(i)] = i;
+}
+var encode = function (arraybuffer) {
+    var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
+    for (i = 0; i < len; i += 3) {
+        base64 += chars[bytes[i] >> 2];
+        base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
+        base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
+        base64 += chars[bytes[i + 2] & 63];
+    }
+    if (len % 3 === 2) {
+        base64 = base64.substring(0, base64.length - 1) + '=';
+    }
+    else if (len % 3 === 1) {
+        base64 = base64.substring(0, base64.length - 2) + '==';
+    }
+    return base64;
+};
+
+/**
+ * Trie2 constants, defining shift widths, index array lengths, etc.
+ *
+ * These are needed for the runtime macros but users can treat these as
+ * implementation details and skip to the actual public API further below.
+ */
+// const UTRIE2_OPTIONS_VALUE_BITS_MASK = 0x000f;
+/** Number of code points per index-1 table entry. 2048=0x800 */
+var UTRIE2_CP_PER_INDEX_1_ENTRY = 1 << UTRIE2_SHIFT_1;
+/** The alignment size of a data block. Also the granularity for compaction. */
+var UTRIE2_DATA_GRANULARITY = 1 << UTRIE2_INDEX_SHIFT;
+/* Fixed layout of the first part of the index array. ------------------- */
+/**
+ * The BMP part of the index-2 table is fixed and linear and starts at offset 0.
+ * Length=2048=0x800=0x10000>>UTRIE2_SHIFT_2.
+ */
+var UTRIE2_INDEX_2_OFFSET = 0;
+var UTRIE2_MAX_INDEX_1_LENGTH = 0x100000 >> UTRIE2_SHIFT_1;
+/*
+ * Fixed layout of the first part of the data array. -----------------------
+ * Starts with 4 blocks (128=0x80 entries) for ASCII.
+ */
+/**
+ * The illegal-UTF-8 data block follows the ASCII block, at offset 128=0x80.
+ * Used with linear access for single bytes 0..0xbf for simple error handling.
+ * Length 64=0x40, not UTRIE2_DATA_BLOCK_LENGTH.
+ */
+var UTRIE2_BAD_UTF8_DATA_OFFSET = 0x80;
+/** The start of non-linear-ASCII data blocks, at offset 192=0xc0. */
+var UTRIE2_DATA_START_OFFSET = 0xc0;
+/* Building a Trie2 ---------------------------------------------------------- */
+/*
+ * These definitions are mostly needed by utrie2_builder.c, but also by
+ * utrie2_get32() and utrie2_enum().
+ */
+/*
+ * At build time, leave a gap in the index-2 table,
+ * at least as long as the maximum lengths of the 2-byte UTF-8 index-2 table
+ * and the supplementary index-1 table.
+ * Round up to UTRIE2_INDEX_2_BLOCK_LENGTH for proper compacting.
+ */
+var UNEWTRIE2_INDEX_GAP_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
+var UNEWTRIE2_INDEX_GAP_LENGTH = (UTRIE2_UTF8_2B_INDEX_2_LENGTH + UTRIE2_MAX_INDEX_1_LENGTH + UTRIE2_INDEX_2_MASK) & ~UTRIE2_INDEX_2_MASK;
+/**
+ * Maximum length of the build-time index-2 array.
+ * Maximum number of Unicode code points (0x110000) shifted right by UTRIE2_SHIFT_2,
+ * plus the part of the index-2 table for lead surrogate code points,
+ * plus the build-time index gap,
+ * plus the null index-2 block.
+ */
+var UNEWTRIE2_MAX_INDEX_2_LENGTH = (0x110000 >> UTRIE2_SHIFT_2) +
+    UTRIE2_LSCP_INDEX_2_LENGTH +
+    UNEWTRIE2_INDEX_GAP_LENGTH +
+    UTRIE2_INDEX_2_BLOCK_LENGTH;
+var UNEWTRIE2_INDEX_1_LENGTH = 0x110000 >> UTRIE2_SHIFT_1;
+/**
+ * Maximum length of the build-time data array.
+ * One entry per 0x110000 code points, plus the illegal-UTF-8 block and the null block,
+ * plus values for the 0x400 surrogate code units.
+ */
+var UNEWTRIE2_MAX_DATA_LENGTH = 0x110000 + 0x40 + 0x40 + 0x400;
+/* Start with allocation of 16k data entries. */
+var UNEWTRIE2_INITIAL_DATA_LENGTH = 1 << 14;
+/* Grow about 8x each time. */
+var UNEWTRIE2_MEDIUM_DATA_LENGTH = 1 << 17;
+/** The null index-2 block, following the gap in the index-2 table. */
+var UNEWTRIE2_INDEX_2_NULL_OFFSET = UNEWTRIE2_INDEX_GAP_OFFSET + UNEWTRIE2_INDEX_GAP_LENGTH;
+/** The start of allocated index-2 blocks. */
+var UNEWTRIE2_INDEX_2_START_OFFSET = UNEWTRIE2_INDEX_2_NULL_OFFSET + UTRIE2_INDEX_2_BLOCK_LENGTH;
+/**
+ * The null data block.
+ * Length 64=0x40 even if UTRIE2_DATA_BLOCK_LENGTH is smaller,
+ * to work with 6-bit trail bytes from 2-byte UTF-8.
+ */
+var UNEWTRIE2_DATA_NULL_OFFSET = UTRIE2_DATA_START_OFFSET;
+/** The start of allocated data blocks. */
+var UNEWTRIE2_DATA_START_OFFSET = UNEWTRIE2_DATA_NULL_OFFSET + 0x40;
+/**
+ * The start of data blocks for U+0800 and above.
+ * Below, compaction uses a block length of 64 for 2-byte UTF-8.
+ * From here on, compaction uses UTRIE2_DATA_BLOCK_LENGTH.
+ * Data values for 0x780 code points beyond ASCII.
+ */
+var UNEWTRIE2_DATA_0800_OFFSET = UNEWTRIE2_DATA_START_OFFSET + 0x780;
+/**
+ * Maximum length of the runtime index array.
+ * Limited by its own 16-bit index values, and by uint16_t UTrie2Header.indexLength.
+ * (The actual maximum length is lower,
+ * (0x110000>>UTRIE2_SHIFT_2)+UTRIE2_UTF8_2B_INDEX_2_LENGTH+UTRIE2_MAX_INDEX_1_LENGTH.)
+ */
+var UTRIE2_MAX_INDEX_LENGTH = 0xffff;
+/**
+ * Maximum length of the runtime data array.
+ * Limited by 16-bit index values that are left-shifted by UTRIE2_INDEX_SHIFT,
+ * and by uint16_t UTrie2Header.shiftedDataLength.
+ */
+var UTRIE2_MAX_DATA_LENGTH = 0xffff << UTRIE2_INDEX_SHIFT;
+var BITS_16 = 16;
+var BITS_32 = 32;
+var isHighSurrogate = function (c) { return c >= 0xd800 && c <= 0xdbff; };
+var equalInt = function (a, s, t, length) {
+    for (var i = 0; i < length; i++) {
+        if (a[s + i] !== a[t + i]) {
+            return false;
+        }
+    }
+    return true;
+};
+var TrieBuilder = /** @class */ (function () {
+    function TrieBuilder(initialValue, errorValue) {
+        if (initialValue === void 0) { initialValue = 0; }
+        if (errorValue === void 0) { errorValue = 0; }
+        this.initialValue = initialValue;
+        this.errorValue = errorValue;
+        this.highStart = 0x110000;
+        this.data = new Uint32Array(UNEWTRIE2_INITIAL_DATA_LENGTH);
+        this.dataCapacity = UNEWTRIE2_INITIAL_DATA_LENGTH;
+        this.highStart = 0x110000;
+        this.firstFreeBlock = 0; /* no free block in the list */
+        this.isCompacted = false;
+        this.index1 = new Uint32Array(UNEWTRIE2_INDEX_1_LENGTH);
+        this.index2 = new Uint32Array(UNEWTRIE2_MAX_INDEX_2_LENGTH);
+        /*
+         * Multi-purpose per-data-block table.
+         *
+         * Before compacting:
+         *
+         * Per-data-block reference counters/free-block list.
+         *  0: unused
+         * >0: reference counter (number of index-2 entries pointing here)
+         * <0: next free data block in free-block list
+         *
+         * While compacting:
+         *
+         * Map of adjusted indexes, used in compactData() and compactIndex2().
+         * Maps from original indexes to new ones.
+         */
+        this.map = new Uint32Array(UNEWTRIE2_MAX_DATA_LENGTH >> UTRIE2_SHIFT_2);
+        /*
+         * preallocate and reset
+         * - ASCII
+         * - the bad-UTF-8-data block
+         * - the null data block
+         */
+        var i, j;
+        for (i = 0; i < 0x80; ++i) {
+            this.data[i] = initialValue;
+        }
+        for (; i < 0xc0; ++i) {
+            this.data[i] = errorValue;
+        }
+        for (i = UNEWTRIE2_DATA_NULL_OFFSET; i < UNEWTRIE2_DATA_START_OFFSET; ++i) {
+            this.data[i] = initialValue;
+        }
+        this.dataNullOffset = UNEWTRIE2_DATA_NULL_OFFSET;
+        this.dataLength = UNEWTRIE2_DATA_START_OFFSET;
+        /* set the index-2 indexes for the 2=0x80>>UTRIE2_SHIFT_2 ASCII data blocks */
+        for (i = 0, j = 0; j < 0x80; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {
+            this.index2[i] = j;
+            this.map[i] = 1;
+        }
+        /* reference counts for the bad-UTF-8-data block */
+        for (; j < 0xc0; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {
+            this.map[i] = 0;
+        }
+        /*
+         * Reference counts for the null data block: all blocks except for the ASCII blocks.
+         * Plus 1 so that we don't drop this block during compaction.
+         * Plus as many as needed for lead surrogate code points.
+         */
+        /* i==newTrie->dataNullOffset */
+        this.map[i++] = (0x110000 >> UTRIE2_SHIFT_2) - (0x80 >> UTRIE2_SHIFT_2) + 1 + UTRIE2_LSCP_INDEX_2_LENGTH;
+        j += UTRIE2_DATA_BLOCK_LENGTH;
+        for (; j < UNEWTRIE2_DATA_START_OFFSET; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {
+            this.map[i] = 0;
+        }
+        /*
+         * set the remaining indexes in the BMP index-2 block
+         * to the null data block
+         */
+        for (i = 0x80 >> UTRIE2_SHIFT_2; i < UTRIE2_INDEX_2_BMP_LENGTH; ++i) {
+            this.index2[i] = UNEWTRIE2_DATA_NULL_OFFSET;
+        }
+        /*
+         * Fill the index gap with impossible values so that compaction
+         * does not overlap other index-2 blocks with the gap.
+         */
+        for (i = 0; i < UNEWTRIE2_INDEX_GAP_LENGTH; ++i) {
+            this.index2[UNEWTRIE2_INDEX_GAP_OFFSET + i] = -1;
+        }
+        /* set the indexes in the null index-2 block */
+        for (i = 0; i < UTRIE2_INDEX_2_BLOCK_LENGTH; ++i) {
+            this.index2[UNEWTRIE2_INDEX_2_NULL_OFFSET + i] = UNEWTRIE2_DATA_NULL_OFFSET;
+        }
+        this.index2NullOffset = UNEWTRIE2_INDEX_2_NULL_OFFSET;
+        this.index2Length = UNEWTRIE2_INDEX_2_START_OFFSET;
+        /* set the index-1 indexes for the linear index-2 block */
+        for (i = 0, j = 0; i < UTRIE2_OMITTED_BMP_INDEX_1_LENGTH; ++i, j += UTRIE2_INDEX_2_BLOCK_LENGTH) {
+            this.index1[i] = j;
+        }
+        /* set the remaining index-1 indexes to the null index-2 block */
+        for (; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {
+            this.index1[i] = UNEWTRIE2_INDEX_2_NULL_OFFSET;
+        }
+        /*
+         * Preallocate and reset data for U+0080..U+07ff,
+         * for 2-byte UTF-8 which will be compacted in 64-blocks
+         * even if UTRIE2_DATA_BLOCK_LENGTH is smaller.
+         */
+        for (i = 0x80; i < 0x800; i += UTRIE2_DATA_BLOCK_LENGTH) {
+            this.set(i, initialValue);
+        }
+    }
+    /**
+     * Set a value for a code point.
+     *
+     * @param c the code point
+     * @param value the value
+     */
+    TrieBuilder.prototype.set = function (c, value) {
+        if (c < 0 || c > 0x10ffff) {
+            throw new Error('Invalid code point.');
+        }
+        this._set(c, true, value);
+        return this;
+    };
+    /**
+     * Set a value in a range of code points [start..end].
+     * All code points c with start<=c<=end will get the value if
+     * overwrite is TRUE or if the old value is the initial value.
+     *
+     * @param start the first code point to get the value
+     * @param end the last code point to get the value (inclusive)
+     * @param value the value
+     * @param overwrite flag for whether old non-initial values are to be overwritten
+     */
+    TrieBuilder.prototype.setRange = function (start, end, value, overwrite) {
+        if (overwrite === void 0) { overwrite = false; }
+        /*
+         * repeat value in [start..end]
+         * mark index values for repeat-data blocks by setting bit 31 of the index values
+         * fill around existing values if any, if(overwrite)
+         */
+        var block, rest, repeatBlock;
+        if (start > 0x10ffff || start < 0 || end > 0x10ffff || end < 0 || start > end) {
+            throw new Error('Invalid code point range.');
+        }
+        if (!overwrite && value === this.initialValue) {
+            return this; /* nothing to do */
+        }
+        if (this.isCompacted) {
+            throw new Error('Trie was already compacted');
+        }
+        var limit = end + 1;
+        if ((start & UTRIE2_DATA_MASK) !== 0) {
+            /* set partial block at [start..following block boundary[ */
+            block = this.getDataBlock(start, true);
+            var nextStart = (start + UTRIE2_DATA_BLOCK_LENGTH) & ~UTRIE2_DATA_MASK;
+            if (nextStart <= limit) {
+                this.fillBlock(block, start & UTRIE2_DATA_MASK, UTRIE2_DATA_BLOCK_LENGTH, value, this.initialValue, overwrite);
+                start = nextStart;
+            }
+            else {
+                this.fillBlock(block, start & UTRIE2_DATA_MASK, limit & UTRIE2_DATA_MASK, value, this.initialValue, overwrite);
+                return this;
+            }
+        }
+        /* number of positions in the last, partial block */
+        rest = limit & UTRIE2_DATA_MASK;
+        /* round down limit to a block boundary */
+        limit &= ~UTRIE2_DATA_MASK;
+        /* iterate over all-value blocks */
+        repeatBlock = value === this.initialValue ? this.dataNullOffset : -1;
+        while (start < limit) {
+            var i2 = void 0;
+            var setRepeatBlock = false;
+            if (value === this.initialValue && this.isInNullBlock(start, true)) {
+                start += UTRIE2_DATA_BLOCK_LENGTH; /* nothing to do */
+                continue;
+            }
+            /* get index value */
+            i2 = this.getIndex2Block(start, true);
+            i2 += (start >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;
+            block = this.index2[i2];
+            if (this.isWritableBlock(block)) {
+                /* already allocated */
+                if (overwrite && block >= UNEWTRIE2_DATA_0800_OFFSET) {
+                    /*
+                     * We overwrite all values, and it's not a
+                     * protected (ASCII-linear or 2-byte UTF-8) block:
+                     * replace with the repeatBlock.
+                     */
+                    setRepeatBlock = true;
+                }
+                else {
+                    /* !overwrite, or protected block: just write the values into this block */
+                    this.fillBlock(block, 0, UTRIE2_DATA_BLOCK_LENGTH, value, this.initialValue, overwrite);
+                }
+            }
+            else if (this.data[block] !== value && (overwrite || block === this.dataNullOffset)) {
+                /*
+                 * Set the repeatBlock instead of the null block or previous repeat block:
+                 *
+                 * If !isWritableBlock() then all entries in the block have the same value
+                 * because it's the null block or a range block (the repeatBlock from a previous
+                 * call to utrie2_setRange32()).
+                 * No other blocks are used multiple times before compacting.
+                 *
+                 * The null block is the only non-writable block with the initialValue because
+                 * of the repeatBlock initialization above. (If value==initialValue, then
+                 * the repeatBlock will be the null data block.)
+                 *
+                 * We set our repeatBlock if the desired value differs from the block's value,
+                 * and if we overwrite any data or if the data is all initial values
+                 * (which is the same as the block being the null block, see above).
+                 */
+                setRepeatBlock = true;
+            }
+            if (setRepeatBlock) {
+                if (repeatBlock >= 0) {
+                    this.setIndex2Entry(i2, repeatBlock);
+                }
+                else {
+                    /* create and set and fill the repeatBlock */
+                    repeatBlock = this.getDataBlock(start, true);
+                    this.writeBlock(repeatBlock, value);
+                }
+            }
+            start += UTRIE2_DATA_BLOCK_LENGTH;
+        }
+        if (rest > 0) {
+            /* set partial block at [last block boundary..limit[ */
+            block = this.getDataBlock(start, true);
+            this.fillBlock(block, 0, rest, value, this.initialValue, overwrite);
+        }
+        return this;
+    };
+    /**
+     * Get the value for a code point as stored in the Trie2.
+     *
+     * @param codePoint the code point
+     * @return the value
+     */
+    TrieBuilder.prototype.get = function (codePoint) {
+        if (codePoint < 0 || codePoint > 0x10ffff) {
+            return this.errorValue;
+        }
+        else {
+            return this._get(codePoint, true);
+        }
+    };
+    TrieBuilder.prototype._get = function (c, fromLSCP) {
+        var i2;
+        if (c >= this.highStart && (!(c >= 0xd800 && c < 0xdc00) || fromLSCP)) {
+            return this.data[this.dataLength - UTRIE2_DATA_GRANULARITY];
+        }
+        if (c >= 0xd800 && c < 0xdc00 && fromLSCP) {
+            i2 = UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> UTRIE2_SHIFT_2) + (c >> UTRIE2_SHIFT_2);
+        }
+        else {
+            i2 = this.index1[c >> UTRIE2_SHIFT_1] + ((c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK);
+        }
+        var block = this.index2[i2];
+        return this.data[block + (c & UTRIE2_DATA_MASK)];
+    };
+    TrieBuilder.prototype.freeze = function (valueBits) {
+        if (valueBits === void 0) { valueBits = BITS_32; }
+        var i;
+        var allIndexesLength;
+        var dataMove; /* >0 if the data is moved to the end of the index array */
+        /* compact if necessary */
+        if (!this.isCompacted) {
+            this.compactTrie();
+        }
+        allIndexesLength = this.highStart <= 0x10000 ? UTRIE2_INDEX_1_OFFSET : this.index2Length;
+        if (valueBits === BITS_16) {
+            // dataMove = allIndexesLength;
+            dataMove = 0;
+        }
+        else {
+            dataMove = 0;
+        }
+        /* are indexLength and dataLength within limits? */
+        if (
+        /* for unshifted indexLength */
+        allIndexesLength > UTRIE2_MAX_INDEX_LENGTH ||
+            /* for unshifted dataNullOffset */
+            dataMove + this.dataNullOffset > 0xffff ||
+            /* for unshifted 2-byte UTF-8 index-2 values */
+            dataMove + UNEWTRIE2_DATA_0800_OFFSET > 0xffff ||
+            /* for shiftedDataLength */
+            dataMove + this.dataLength > UTRIE2_MAX_DATA_LENGTH) {
+            throw new Error('Trie data is too large.');
+        }
+        var index = new Uint16Array(allIndexesLength);
+        /* write the index-2 array values shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove */
+        var destIdx = 0;
+        for (i = 0; i < UTRIE2_INDEX_2_BMP_LENGTH; i++) {
+            index[destIdx++] = (this.index2[i] + dataMove) >> UTRIE2_INDEX_SHIFT;
+        }
+        /* write UTF-8 2-byte index-2 values, not right-shifted */
+        for (i = 0; i < 0xc2 - 0xc0; ++i) {
+            /* C0..C1 */
+            index[destIdx++] = dataMove + UTRIE2_BAD_UTF8_DATA_OFFSET;
+        }
+        for (; i < 0xe0 - 0xc0; ++i) {
+            /* C2..DF */
+            index[destIdx++] = dataMove + this.index2[i << (6 - UTRIE2_SHIFT_2)];
+        }
+        if (this.highStart > 0x10000) {
+            var index1Length = (this.highStart - 0x10000) >> UTRIE2_SHIFT_1;
+            var index2Offset = UTRIE2_INDEX_2_BMP_LENGTH + UTRIE2_UTF8_2B_INDEX_2_LENGTH + index1Length;
+            /* write 16-bit index-1 values for supplementary code points */
+            for (i = 0; i < index1Length; i++) {
+                index[destIdx++] = UTRIE2_INDEX_2_OFFSET + this.index1[i + UTRIE2_OMITTED_BMP_INDEX_1_LENGTH];
+            }
+            /*
+             * write the index-2 array values for supplementary code points,
+             * shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove
+             */
+            for (i = 0; i < this.index2Length - index2Offset; i++) {
+                index[destIdx++] = (dataMove + this.index2[index2Offset + i]) >> UTRIE2_INDEX_SHIFT;
+            }
+        }
+        /* write the 16/32-bit data array */
+        switch (valueBits) {
+            case BITS_16:
+                /* write 16-bit data values */
+                var data16 = new Uint16Array(this.dataLength);
+                for (i = 0; i < this.dataLength; i++) {
+                    data16[i] = this.data[i];
+                }
+                return new Trie(this.initialValue, this.errorValue, this.highStart, dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY, index, data16);
+            case BITS_32:
+                /* write 32-bit data values */
+                var data32 = new Uint32Array(this.dataLength);
+                for (i = 0; i < this.dataLength; i++) {
+                    data32[i] = this.data[i];
+                }
+                return new Trie(this.initialValue, this.errorValue, this.highStart, dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY, index, data32);
+            default:
+                throw new Error('Bits should be either 16 or 32');
+        }
+    };
+    /*
+     * Find the start of the last range in the trie by enumerating backward.
+     * Indexes for supplementary code points higher than this will be omitted.
+     */
+    TrieBuilder.prototype.findHighStart = function (highValue) {
+        var value;
+        var i2, j, i2Block, prevI2Block, block, prevBlock;
+        /* set variables for previous range */
+        if (highValue === this.initialValue) {
+            prevI2Block = this.index2NullOffset;
+            prevBlock = this.dataNullOffset;
+        }
+        else {
+            prevI2Block = -1;
+            prevBlock = -1;
+        }
+        var prev = 0x110000;
+        /* enumerate index-2 blocks */
+        var i1 = UNEWTRIE2_INDEX_1_LENGTH;
+        var c = prev;
+        while (c > 0) {
+            i2Block = this.index1[--i1];
+            if (i2Block === prevI2Block) {
+                /* the index-2 block is the same as the previous one, and filled with highValue */
+                c -= UTRIE2_CP_PER_INDEX_1_ENTRY;
+                continue;
+            }
+            prevI2Block = i2Block;
+            if (i2Block === this.index2NullOffset) {
+                /* this is the null index-2 block */
+                if (highValue !== this.initialValue) {
+                    return c;
+                }
+                c -= UTRIE2_CP_PER_INDEX_1_ENTRY;
+            }
+            else {
+                /* enumerate data blocks for one index-2 block */
+                for (i2 = UTRIE2_INDEX_2_BLOCK_LENGTH; i2 > 0;) {
+                    block = this.index2[i2Block + --i2];
+                    if (block === prevBlock) {
+                        /* the block is the same as the previous one, and filled with highValue */
+                        c -= UTRIE2_DATA_BLOCK_LENGTH;
+                        continue;
+                    }
+                    prevBlock = block;
+                    if (block === this.dataNullOffset) {
+                        /* this is the null data block */
+                        if (highValue !== this.initialValue) {
+                            return c;
+                        }
+                        c -= UTRIE2_DATA_BLOCK_LENGTH;
+                    }
+                    else {
+                        for (j = UTRIE2_DATA_BLOCK_LENGTH; j > 0;) {
+                            value = this.data[block + --j];
+                            if (value !== highValue) {
+                                return c;
+                            }
+                            --c;
+                        }
+                    }
+                }
+            }
+        }
+        /* deliver last range */
+        return 0;
+    };
+    /*
+     * Compact a build-time trie.
+     *
+     * The compaction
+     * - removes blocks that are identical with earlier ones
+     * - overlaps adjacent blocks as much as possible (if overlap==TRUE)
+     * - moves blocks in steps of the data granularity
+     * - moves and overlaps blocks that overlap with multiple values in the overlap region
+     *
+     * It does not
+     * - try to move and overlap blocks that are not already adjacent
+     */
+    TrieBuilder.prototype.compactData = function () {
+        var start, movedStart;
+        var blockLength, overlap;
+        var i, mapIndex, blockCount;
+        /* do not compact linear-ASCII data */
+        var newStart = UTRIE2_DATA_START_OFFSET;
+        for (start = 0, i = 0; start < newStart; start += UTRIE2_DATA_BLOCK_LENGTH, ++i) {
+            this.map[i] = start;
+        }
+        /*
+         * Start with a block length of 64 for 2-byte UTF-8,
+         * then switch to UTRIE2_DATA_BLOCK_LENGTH.
+         */
+        blockLength = 64;
+        blockCount = blockLength >> UTRIE2_SHIFT_2;
+        for (start = newStart; start < this.dataLength;) {
+            /*
+             * start: index of first entry of current block
+             * newStart: index where the current block is to be moved
+             *           (right after current end of already-compacted data)
+             */
+            if (start === UNEWTRIE2_DATA_0800_OFFSET) {
+                blockLength = UTRIE2_DATA_BLOCK_LENGTH;
+                blockCount = 1;
+            }
+            /* skip blocks that are not used */
+            if (this.map[start >> UTRIE2_SHIFT_2] <= 0) {
+                /* advance start to the next block */
+                start += blockLength;
+                /* leave newStart with the previous block! */
+                continue;
+            }
+            /* search for an identical block */
+            movedStart = this.findSameDataBlock(newStart, start, blockLength);
+            if (movedStart >= 0) {
+                /* found an identical block, set the other block's index value for the current block */
+                for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {
+                    this.map[mapIndex++] = movedStart;
+                    movedStart += UTRIE2_DATA_BLOCK_LENGTH;
+                }
+                /* advance start to the next block */
+                start += blockLength;
+                /* leave newStart with the previous block! */
+                continue;
+            }
+            /* see if the beginning of this block can be overlapped with the end of the previous block */
+            /* look for maximum overlap (modulo granularity) with the previous, adjacent block */
+            for (overlap = blockLength - UTRIE2_DATA_GRANULARITY; overlap > 0 && !equalInt(this.data, newStart - overlap, start, overlap); overlap -= UTRIE2_DATA_GRANULARITY) { }
+            if (overlap > 0 || newStart < start) {
+                /* some overlap, or just move the whole block */
+                movedStart = newStart - overlap;
+                for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {
+                    this.map[mapIndex++] = movedStart;
+                    movedStart += UTRIE2_DATA_BLOCK_LENGTH;
+                }
+                /* move the non-overlapping indexes to their new positions */
+                start += overlap;
+                for (i = blockLength - overlap; i > 0; --i) {
+                    this.data[newStart++] = this.data[start++];
+                }
+            }
+            else {
+                /* no overlap && newStart==start */
+                for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {
+                    this.map[mapIndex++] = start;
+                    start += UTRIE2_DATA_BLOCK_LENGTH;
+                }
+                newStart = start;
+            }
+        }
+        /* now adjust the index-2 table */
+        for (i = 0; i < this.index2Length; ++i) {
+            if (i === UNEWTRIE2_INDEX_GAP_OFFSET) {
+                /* Gap indexes are invalid (-1). Skip over the gap. */
+                i += UNEWTRIE2_INDEX_GAP_LENGTH;
+            }
+            this.index2[i] = this.map[this.index2[i] >> UTRIE2_SHIFT_2];
+        }
+        this.dataNullOffset = this.map[this.dataNullOffset >> UTRIE2_SHIFT_2];
+        /* ensure dataLength alignment */
+        while ((newStart & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {
+            this.data[newStart++] = this.initialValue;
+        }
+        this.dataLength = newStart;
+    };
+    TrieBuilder.prototype.findSameDataBlock = function (dataLength, otherBlock, blockLength) {
+        var block = 0;
+        /* ensure that we do not even partially get past dataLength */
+        dataLength -= blockLength;
+        for (; block <= dataLength; block += UTRIE2_DATA_GRANULARITY) {
+            if (equalInt(this.data, block, otherBlock, blockLength)) {
+                return block;
+            }
+        }
+        return -1;
+    };
+    TrieBuilder.prototype.compactTrie = function () {
+        var highValue = this.get(0x10ffff);
+        /* find highStart and round it up */
+        var localHighStart = this.findHighStart(highValue);
+        localHighStart = (localHighStart + (UTRIE2_CP_PER_INDEX_1_ENTRY - 1)) & ~(UTRIE2_CP_PER_INDEX_1_ENTRY - 1);
+        if (localHighStart === 0x110000) {
+            highValue = this.errorValue;
+        }
+        /*
+         * Set trie->highStart only after utrie2_get32(trie, highStart).
+         * Otherwise utrie2_get32(trie, highStart) would try to read the highValue.
+         */
+        this.highStart = localHighStart;
+        if (this.highStart < 0x110000) {
+            /* Blank out [highStart..10ffff] to release associated data blocks. */
+            var suppHighStart = this.highStart <= 0x10000 ? 0x10000 : this.highStart;
+            this.setRange(suppHighStart, 0x10ffff, this.initialValue, true);
+        }
+        this.compactData();
+        if (this.highStart > 0x10000) {
+            this.compactIndex2();
+        }
+        /*
+         * Store the highValue in the data array and round up the dataLength.
+         * Must be done after compactData() because that assumes that dataLength
+         * is a multiple of UTRIE2_DATA_BLOCK_LENGTH.
+         */
+        this.data[this.dataLength++] = highValue;
+        while ((this.dataLength & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {
+            this.data[this.dataLength++] = this.initialValue;
+        }
+        this.isCompacted = true;
+    };
+    TrieBuilder.prototype.compactIndex2 = function () {
+        var i, start, movedStart, overlap;
+        /* do not compact linear-BMP index-2 blocks */
+        var newStart = UTRIE2_INDEX_2_BMP_LENGTH;
+        for (start = 0, i = 0; start < newStart; start += UTRIE2_INDEX_2_BLOCK_LENGTH, ++i) {
+            this.map[i] = start;
+        }
+        /* Reduce the index table gap to what will be needed at runtime. */
+        newStart += UTRIE2_UTF8_2B_INDEX_2_LENGTH + ((this.highStart - 0x10000) >> UTRIE2_SHIFT_1);
+        for (start = UNEWTRIE2_INDEX_2_NULL_OFFSET; start < this.index2Length;) {
+            /*
+             * start: index of first entry of current block
+             * newStart: index where the current block is to be moved
+             *           (right after current end of already-compacted data)
+             */
+            /* search for an identical block */
+            if ((movedStart = this.findSameIndex2Block(newStart, start)) >= 0) {
+                /* found an identical block, set the other block's index value for the current block */
+                this.map[start >> UTRIE2_SHIFT_1_2] = movedStart;
+                /* advance start to the next block */
+                start += UTRIE2_INDEX_2_BLOCK_LENGTH;
+                /* leave newStart with the previous block! */
+                continue;
+            }
+            /* see if the beginning of this block can be overlapped with the end of the previous block */
+            /* look for maximum overlap with the previous, adjacent block */
+            for (overlap = UTRIE2_INDEX_2_BLOCK_LENGTH - 1; overlap > 0 && !equalInt(this.index2, newStart - overlap, start, overlap); --overlap) { }
+            if (overlap > 0 || newStart < start) {
+                /* some overlap, or just move the whole block */
+                this.map[start >> UTRIE2_SHIFT_1_2] = newStart - overlap;
+                /* move the non-overlapping indexes to their new positions */
+                start += overlap;
+                for (i = UTRIE2_INDEX_2_BLOCK_LENGTH - overlap; i > 0; --i) {
+                    this.index2[newStart++] = this.index2[start++];
+                }
+            }
+            else {
+                /* no overlap && newStart==start */ this.map[start >> UTRIE2_SHIFT_1_2] = start;
+                start += UTRIE2_INDEX_2_BLOCK_LENGTH;
+                newStart = start;
+            }
+        }
+        /* now adjust the index-1 table */
+        for (i = 0; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {
+            this.index1[i] = this.map[this.index1[i] >> UTRIE2_SHIFT_1_2];
+        }
+        this.index2NullOffset = this.map[this.index2NullOffset >> UTRIE2_SHIFT_1_2];
+        /*
+         * Ensure data table alignment:
+         * Needs to be granularity-aligned for 16-bit trie
+         * (so that dataMove will be down-shiftable),
+         * and 2-aligned for uint32_t data.
+         */
+        while ((newStart & ((UTRIE2_DATA_GRANULARITY - 1) | 1)) !== 0) {
+            /* Arbitrary value: 0x3fffc not possible for real data. */
+            this.index2[newStart++] = 0x0000ffff << UTRIE2_INDEX_SHIFT;
+        }
+        this.index2Length = newStart;
+    };
+    TrieBuilder.prototype.findSameIndex2Block = function (index2Length, otherBlock) {
+        /* ensure that we do not even partially get past index2Length */
+        index2Length -= UTRIE2_INDEX_2_BLOCK_LENGTH;
+        for (var block = 0; block <= index2Length; ++block) {
+            if (equalInt(this.index2, block, otherBlock, UTRIE2_INDEX_2_BLOCK_LENGTH)) {
+                return block;
+            }
+        }
+        return -1;
+    };
+    TrieBuilder.prototype._set = function (c, forLSCP, value) {
+        if (this.isCompacted) {
+            throw new Error('Trie was already compacted');
+        }
+        var block = this.getDataBlock(c, forLSCP);
+        this.data[block + (c & UTRIE2_DATA_MASK)] = value;
+        return this;
+    };
+    TrieBuilder.prototype.writeBlock = function (block, value) {
+        var limit = block + UTRIE2_DATA_BLOCK_LENGTH;
+        while (block < limit) {
+            this.data[block++] = value;
+        }
+    };
+    TrieBuilder.prototype.isInNullBlock = function (c, forLSCP) {
+        var i2 = isHighSurrogate(c) && forLSCP
+            ? UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> UTRIE2_SHIFT_2) + (c >> UTRIE2_SHIFT_2)
+            : this.index1[c >> UTRIE2_SHIFT_1] + ((c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK);
+        var block = this.index2[i2];
+        return block === this.dataNullOffset;
+    };
+    TrieBuilder.prototype.fillBlock = function (block, start, limit, value, initialValue, overwrite) {
+        var pLimit = block + limit;
+        if (overwrite) {
+            for (var i = block + start; i < pLimit; i++) {
+                this.data[i] = value;
+            }
+        }
+        else {
+            for (var i = block + start; i < pLimit; i++) {
+                if (this.data[i] === initialValue) {
+                    this.data[i] = value;
+                }
+            }
+        }
+    };
+    TrieBuilder.prototype.setIndex2Entry = function (i2, block) {
+        ++this.map[block >> UTRIE2_SHIFT_2]; /* increment first, in case block==oldBlock! */
+        var oldBlock = this.index2[i2];
+        if (0 === --this.map[oldBlock >> UTRIE2_SHIFT_2]) {
+            this.releaseDataBlock(oldBlock);
+        }
+        this.index2[i2] = block;
+    };
+    TrieBuilder.prototype.releaseDataBlock = function (block) {
+        /* put this block at the front of the free-block chain */
+        this.map[block >> UTRIE2_SHIFT_2] = -this.firstFreeBlock;
+        this.firstFreeBlock = block;
+    };
+    TrieBuilder.prototype.getDataBlock = function (c, forLSCP) {
+        var i2 = this.getIndex2Block(c, forLSCP);
+        i2 += (c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;
+        var oldBlock = this.index2[i2];
+        if (this.isWritableBlock(oldBlock)) {
+            return oldBlock;
+        }
+        /* allocate a new data block */
+        var newBlock = this.allocDataBlock(oldBlock);
+        this.setIndex2Entry(i2, newBlock);
+        return newBlock;
+    };
+    TrieBuilder.prototype.isWritableBlock = function (block) {
+        return block !== this.dataNullOffset && 1 === this.map[block >> UTRIE2_SHIFT_2];
+    };
+    TrieBuilder.prototype.getIndex2Block = function (c, forLSCP) {
+        if (c >= 0xd800 && c < 0xdc00 && forLSCP) {
+            return UTRIE2_LSCP_INDEX_2_OFFSET;
+        }
+        var i1 = c >> UTRIE2_SHIFT_1;
+        var i2 = this.index1[i1];
+        if (i2 === this.index2NullOffset) {
+            i2 = this.allocIndex2Block();
+            this.index1[i1] = i2;
+        }
+        return i2;
+    };
+    TrieBuilder.prototype.allocDataBlock = function (copyBlock) {
+        var newBlock;
+        if (this.firstFreeBlock !== 0) {
+            /* get the first free block */
+            newBlock = this.firstFreeBlock;
+            this.firstFreeBlock = -this.map[newBlock >> UTRIE2_SHIFT_2];
+        }
+        else {
+            /* get a new block from the high end */
+            newBlock = this.dataLength;
+            var newTop = newBlock + UTRIE2_DATA_BLOCK_LENGTH;
+            if (newTop > this.dataCapacity) {
+                var capacity = void 0;
+                /* out of memory in the data array */
+                if (this.dataCapacity < UNEWTRIE2_MEDIUM_DATA_LENGTH) {
+                    capacity = UNEWTRIE2_MEDIUM_DATA_LENGTH;
+                }
+                else if (this.dataCapacity < UNEWTRIE2_MAX_DATA_LENGTH) {
+                    capacity = UNEWTRIE2_MAX_DATA_LENGTH;
+                }
+                else {
+                    /*
+                     * Should never occur.
+                     * Either UNEWTRIE2_MAX_DATA_LENGTH is incorrect,
+                     * or the code writes more values than should be possible.
+                     */
+                    throw new Error('Internal error in Trie creation.');
+                }
+                var newData = new Uint32Array(capacity);
+                newData.set(this.data.subarray(0, this.dataLength));
+                this.data = newData;
+                this.dataCapacity = capacity;
+            }
+            this.dataLength = newTop;
+        }
+        this.data.set(this.data.subarray(copyBlock, copyBlock + UTRIE2_DATA_BLOCK_LENGTH), newBlock);
+        this.map[newBlock >> UTRIE2_SHIFT_2] = 0;
+        return newBlock;
+    };
+    TrieBuilder.prototype.allocIndex2Block = function () {
+        var newBlock = this.index2Length;
+        var newTop = newBlock + UTRIE2_INDEX_2_BLOCK_LENGTH;
+        if (newTop > this.index2.length) {
+            throw new Error('Internal error in Trie creation.');
+            /*
+             * Should never occur.
+             * Either UTRIE2_MAX_BUILD_TIME_INDEX_LENGTH is incorrect,
+             * or the code writes more values than should be possible.
+             */
+        }
+        this.index2Length = newTop;
+        this.index2.set(this.index2.subarray(this.index2NullOffset, this.index2NullOffset + UTRIE2_INDEX_2_BLOCK_LENGTH), newBlock);
+        return newBlock;
+    };
+    return TrieBuilder;
+}());
+var serializeBase64 = function (trie) {
+    var index = trie.index;
+    var data = trie.data;
+    if (!(index instanceof Uint16Array) || !(data instanceof Uint16Array || data instanceof Uint32Array)) {
+        throw new Error('TrieBuilder serializer only support TypedArrays');
+    }
+    var headerLength = Uint32Array.BYTES_PER_ELEMENT * 6;
+    var bufferLength = headerLength + index.byteLength + data.byteLength;
+    var buffer = new ArrayBuffer(Math.ceil(bufferLength / 4) * 4);
+    var view32 = new Uint32Array(buffer);
+    var view16 = new Uint16Array(buffer);
+    view32[0] = trie.initialValue;
+    view32[1] = trie.errorValue;
+    view32[2] = trie.highStart;
+    view32[3] = trie.highValueIndex;
+    view32[4] = index.byteLength;
+    // $FlowFixMe
+    view32[5] = data.BYTES_PER_ELEMENT;
+    view16.set(index, headerLength / Uint16Array.BYTES_PER_ELEMENT);
+    if (data.BYTES_PER_ELEMENT === Uint16Array.BYTES_PER_ELEMENT) {
+        view16.set(data, (headerLength + index.byteLength) / Uint16Array.BYTES_PER_ELEMENT);
+    }
+    else {
+        view32.set(data, Math.ceil((headerLength + index.byteLength) / Uint32Array.BYTES_PER_ELEMENT));
+    }
+    return [encode(new Uint8Array(buffer)), buffer.byteLength];
+};
+
+export { Trie, TrieBuilder, createTrieFromBase64, serializeBase64 };
+//# sourceMappingURL=utrie.es5.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/utrie/dist/utrie.es5.js.map


+ 1114 - 0
node_modules/utrie/dist/utrie.umd.js

@@ -0,0 +1,1114 @@
+/*
+ * utrie 1.0.2 <https://github.com/niklasvh/utrie>
+ * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
+ * Released under MIT License
+ */
+(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.utrie = {}));
+}(this, (function (exports) { 'use strict';
+
+    var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+    // Use a lookup table to find the index.
+    var lookup$1 = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+    for (var i$1 = 0; i$1 < chars$1.length; i$1++) {
+        lookup$1[chars$1.charCodeAt(i$1)] = i$1;
+    }
+    var decode = function (base64) {
+        var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
+        if (base64[base64.length - 1] === '=') {
+            bufferLength--;
+            if (base64[base64.length - 2] === '=') {
+                bufferLength--;
+            }
+        }
+        var buffer = typeof ArrayBuffer !== 'undefined' &&
+            typeof Uint8Array !== 'undefined' &&
+            typeof Uint8Array.prototype.slice !== 'undefined'
+            ? new ArrayBuffer(bufferLength)
+            : new Array(bufferLength);
+        var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
+        for (i = 0; i < len; i += 4) {
+            encoded1 = lookup$1[base64.charCodeAt(i)];
+            encoded2 = lookup$1[base64.charCodeAt(i + 1)];
+            encoded3 = lookup$1[base64.charCodeAt(i + 2)];
+            encoded4 = lookup$1[base64.charCodeAt(i + 3)];
+            bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+            bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+            bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+        }
+        return buffer;
+    };
+    var polyUint16Array = function (buffer) {
+        var length = buffer.length;
+        var bytes = [];
+        for (var i = 0; i < length; i += 2) {
+            bytes.push((buffer[i + 1] << 8) | buffer[i]);
+        }
+        return bytes;
+    };
+    var polyUint32Array = function (buffer) {
+        var length = buffer.length;
+        var bytes = [];
+        for (var i = 0; i < length; i += 4) {
+            bytes.push((buffer[i + 3] << 24) | (buffer[i + 2] << 16) | (buffer[i + 1] << 8) | buffer[i]);
+        }
+        return bytes;
+    };
+
+    /** Shift size for getting the index-2 table offset. */
+    var UTRIE2_SHIFT_2 = 5;
+    /** Shift size for getting the index-1 table offset. */
+    var UTRIE2_SHIFT_1 = 6 + 5;
+    /**
+     * Shift size for shifting left the index array values.
+     * Increases possible data size with 16-bit index values at the cost
+     * of compactability.
+     * This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
+     */
+    var UTRIE2_INDEX_SHIFT = 2;
+    /**
+     * Difference between the two shift sizes,
+     * for getting an index-1 offset from an index-2 offset. 6=11-5
+     */
+    var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
+    /**
+     * The part of the index-2 table for U+D800..U+DBFF stores values for
+     * lead surrogate code _units_ not code _points_.
+     * Values for lead surrogate code _points_ are indexed with this portion of the table.
+     * Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
+     */
+    var UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;
+    /** Number of entries in a data block. 32=0x20 */
+    var UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
+    /** Mask for getting the lower bits for the in-data-block offset. */
+    var UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
+    var UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;
+    /** Count the lengths of both BMP pieces. 2080=0x820 */
+    var UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
+    /**
+     * The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
+     * Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
+     */
+    var UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
+    var UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
+    /**
+     * The index-1 table, only used for supplementary code points, at offset 2112=0x840.
+     * Variable length, for code points up to highStart, where the last single-value range starts.
+     * Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
+     * (For 0x100000 supplementary code points U+10000..U+10ffff.)
+     *
+     * The part of the index-2 table for supplementary code points starts
+     * after this index-1 table.
+     *
+     * Both the index-1 table and the following part of the index-2 table
+     * are omitted completely if there is only BMP data.
+     */
+    var UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
+    /**
+     * Number of index-1 entries for the BMP. 32=0x20
+     * This part of the index-1 table is omitted from the serialized form.
+     */
+    var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;
+    /** Number of entries in an index-2 block. 64=0x40 */
+    var UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
+    /** Mask for getting the lower bits for the in-index-2-block offset. */
+    var UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
+    var slice16 = function (view, start, end) {
+        if (view.slice) {
+            return view.slice(start, end);
+        }
+        return new Uint16Array(Array.prototype.slice.call(view, start, end));
+    };
+    var slice32 = function (view, start, end) {
+        if (view.slice) {
+            return view.slice(start, end);
+        }
+        return new Uint32Array(Array.prototype.slice.call(view, start, end));
+    };
+    var createTrieFromBase64 = function (base64, _byteLength) {
+        var buffer = decode(base64);
+        var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);
+        var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);
+        var headerLength = 24;
+        var index = slice16(view16, headerLength / 2, view32[4] / 2);
+        var data = view32[5] === 2
+            ? slice16(view16, (headerLength + view32[4]) / 2)
+            : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));
+        return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
+    };
+    var Trie = /** @class */ (function () {
+        function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
+            this.initialValue = initialValue;
+            this.errorValue = errorValue;
+            this.highStart = highStart;
+            this.highValueIndex = highValueIndex;
+            this.index = index;
+            this.data = data;
+        }
+        /**
+         * Get the value for a code point as stored in the Trie.
+         *
+         * @param codePoint the code point
+         * @return the value
+         */
+        Trie.prototype.get = function (codePoint) {
+            var ix;
+            if (codePoint >= 0) {
+                if (codePoint < 0x0d800 || (codePoint > 0x0dbff && codePoint <= 0x0ffff)) {
+                    // Ordinary BMP code point, excluding leading surrogates.
+                    // BMP uses a single level lookup.  BMP index starts at offset 0 in the Trie2 index.
+                    // 16 bit data is stored in the index array itself.
+                    ix = this.index[codePoint >> UTRIE2_SHIFT_2];
+                    ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
+                    return this.data[ix];
+                }
+                if (codePoint <= 0xffff) {
+                    // Lead Surrogate Code Point.  A Separate index section is stored for
+                    // lead surrogate code units and code points.
+                    //   The main index has the code unit data.
+                    //   For this function, we need the code point data.
+                    // Note: this expression could be refactored for slightly improved efficiency, but
+                    //       surrogate code points will be so rare in practice that it's not worth it.
+                    ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> UTRIE2_SHIFT_2)];
+                    ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
+                    return this.data[ix];
+                }
+                if (codePoint < this.highStart) {
+                    // Supplemental code point, use two-level lookup.
+                    ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
+                    ix = this.index[ix];
+                    ix += (codePoint >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;
+                    ix = this.index[ix];
+                    ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
+                    return this.data[ix];
+                }
+                if (codePoint <= 0x10ffff) {
+                    return this.data[this.highValueIndex];
+                }
+            }
+            // Fall through.  The code point is outside of the legal range of 0..0x10ffff.
+            return this.errorValue;
+        };
+        return Trie;
+    }());
+
+    /*
+     * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>
+     * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
+     * Released under MIT License
+     */
+    var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+    // Use a lookup table to find the index.
+    var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
+    for (var i = 0; i < chars.length; i++) {
+        lookup[chars.charCodeAt(i)] = i;
+    }
+    var encode = function (arraybuffer) {
+        var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';
+        for (i = 0; i < len; i += 3) {
+            base64 += chars[bytes[i] >> 2];
+            base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
+            base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
+            base64 += chars[bytes[i + 2] & 63];
+        }
+        if (len % 3 === 2) {
+            base64 = base64.substring(0, base64.length - 1) + '=';
+        }
+        else if (len % 3 === 1) {
+            base64 = base64.substring(0, base64.length - 2) + '==';
+        }
+        return base64;
+    };
+
+    /**
+     * Trie2 constants, defining shift widths, index array lengths, etc.
+     *
+     * These are needed for the runtime macros but users can treat these as
+     * implementation details and skip to the actual public API further below.
+     */
+    // const UTRIE2_OPTIONS_VALUE_BITS_MASK = 0x000f;
+    /** Number of code points per index-1 table entry. 2048=0x800 */
+    var UTRIE2_CP_PER_INDEX_1_ENTRY = 1 << UTRIE2_SHIFT_1;
+    /** The alignment size of a data block. Also the granularity for compaction. */
+    var UTRIE2_DATA_GRANULARITY = 1 << UTRIE2_INDEX_SHIFT;
+    /* Fixed layout of the first part of the index array. ------------------- */
+    /**
+     * The BMP part of the index-2 table is fixed and linear and starts at offset 0.
+     * Length=2048=0x800=0x10000>>UTRIE2_SHIFT_2.
+     */
+    var UTRIE2_INDEX_2_OFFSET = 0;
+    var UTRIE2_MAX_INDEX_1_LENGTH = 0x100000 >> UTRIE2_SHIFT_1;
+    /*
+     * Fixed layout of the first part of the data array. -----------------------
+     * Starts with 4 blocks (128=0x80 entries) for ASCII.
+     */
+    /**
+     * The illegal-UTF-8 data block follows the ASCII block, at offset 128=0x80.
+     * Used with linear access for single bytes 0..0xbf for simple error handling.
+     * Length 64=0x40, not UTRIE2_DATA_BLOCK_LENGTH.
+     */
+    var UTRIE2_BAD_UTF8_DATA_OFFSET = 0x80;
+    /** The start of non-linear-ASCII data blocks, at offset 192=0xc0. */
+    var UTRIE2_DATA_START_OFFSET = 0xc0;
+    /* Building a Trie2 ---------------------------------------------------------- */
+    /*
+     * These definitions are mostly needed by utrie2_builder.c, but also by
+     * utrie2_get32() and utrie2_enum().
+     */
+    /*
+     * At build time, leave a gap in the index-2 table,
+     * at least as long as the maximum lengths of the 2-byte UTF-8 index-2 table
+     * and the supplementary index-1 table.
+     * Round up to UTRIE2_INDEX_2_BLOCK_LENGTH for proper compacting.
+     */
+    var UNEWTRIE2_INDEX_GAP_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
+    var UNEWTRIE2_INDEX_GAP_LENGTH = (UTRIE2_UTF8_2B_INDEX_2_LENGTH + UTRIE2_MAX_INDEX_1_LENGTH + UTRIE2_INDEX_2_MASK) & ~UTRIE2_INDEX_2_MASK;
+    /**
+     * Maximum length of the build-time index-2 array.
+     * Maximum number of Unicode code points (0x110000) shifted right by UTRIE2_SHIFT_2,
+     * plus the part of the index-2 table for lead surrogate code points,
+     * plus the build-time index gap,
+     * plus the null index-2 block.
+     */
+    var UNEWTRIE2_MAX_INDEX_2_LENGTH = (0x110000 >> UTRIE2_SHIFT_2) +
+        UTRIE2_LSCP_INDEX_2_LENGTH +
+        UNEWTRIE2_INDEX_GAP_LENGTH +
+        UTRIE2_INDEX_2_BLOCK_LENGTH;
+    var UNEWTRIE2_INDEX_1_LENGTH = 0x110000 >> UTRIE2_SHIFT_1;
+    /**
+     * Maximum length of the build-time data array.
+     * One entry per 0x110000 code points, plus the illegal-UTF-8 block and the null block,
+     * plus values for the 0x400 surrogate code units.
+     */
+    var UNEWTRIE2_MAX_DATA_LENGTH = 0x110000 + 0x40 + 0x40 + 0x400;
+    /* Start with allocation of 16k data entries. */
+    var UNEWTRIE2_INITIAL_DATA_LENGTH = 1 << 14;
+    /* Grow about 8x each time. */
+    var UNEWTRIE2_MEDIUM_DATA_LENGTH = 1 << 17;
+    /** The null index-2 block, following the gap in the index-2 table. */
+    var UNEWTRIE2_INDEX_2_NULL_OFFSET = UNEWTRIE2_INDEX_GAP_OFFSET + UNEWTRIE2_INDEX_GAP_LENGTH;
+    /** The start of allocated index-2 blocks. */
+    var UNEWTRIE2_INDEX_2_START_OFFSET = UNEWTRIE2_INDEX_2_NULL_OFFSET + UTRIE2_INDEX_2_BLOCK_LENGTH;
+    /**
+     * The null data block.
+     * Length 64=0x40 even if UTRIE2_DATA_BLOCK_LENGTH is smaller,
+     * to work with 6-bit trail bytes from 2-byte UTF-8.
+     */
+    var UNEWTRIE2_DATA_NULL_OFFSET = UTRIE2_DATA_START_OFFSET;
+    /** The start of allocated data blocks. */
+    var UNEWTRIE2_DATA_START_OFFSET = UNEWTRIE2_DATA_NULL_OFFSET + 0x40;
+    /**
+     * The start of data blocks for U+0800 and above.
+     * Below, compaction uses a block length of 64 for 2-byte UTF-8.
+     * From here on, compaction uses UTRIE2_DATA_BLOCK_LENGTH.
+     * Data values for 0x780 code points beyond ASCII.
+     */
+    var UNEWTRIE2_DATA_0800_OFFSET = UNEWTRIE2_DATA_START_OFFSET + 0x780;
+    /**
+     * Maximum length of the runtime index array.
+     * Limited by its own 16-bit index values, and by uint16_t UTrie2Header.indexLength.
+     * (The actual maximum length is lower,
+     * (0x110000>>UTRIE2_SHIFT_2)+UTRIE2_UTF8_2B_INDEX_2_LENGTH+UTRIE2_MAX_INDEX_1_LENGTH.)
+     */
+    var UTRIE2_MAX_INDEX_LENGTH = 0xffff;
+    /**
+     * Maximum length of the runtime data array.
+     * Limited by 16-bit index values that are left-shifted by UTRIE2_INDEX_SHIFT,
+     * and by uint16_t UTrie2Header.shiftedDataLength.
+     */
+    var UTRIE2_MAX_DATA_LENGTH = 0xffff << UTRIE2_INDEX_SHIFT;
+    var BITS_16 = 16;
+    var BITS_32 = 32;
+    var isHighSurrogate = function (c) { return c >= 0xd800 && c <= 0xdbff; };
+    var equalInt = function (a, s, t, length) {
+        for (var i = 0; i < length; i++) {
+            if (a[s + i] !== a[t + i]) {
+                return false;
+            }
+        }
+        return true;
+    };
+    var TrieBuilder = /** @class */ (function () {
+        function TrieBuilder(initialValue, errorValue) {
+            if (initialValue === void 0) { initialValue = 0; }
+            if (errorValue === void 0) { errorValue = 0; }
+            this.initialValue = initialValue;
+            this.errorValue = errorValue;
+            this.highStart = 0x110000;
+            this.data = new Uint32Array(UNEWTRIE2_INITIAL_DATA_LENGTH);
+            this.dataCapacity = UNEWTRIE2_INITIAL_DATA_LENGTH;
+            this.highStart = 0x110000;
+            this.firstFreeBlock = 0; /* no free block in the list */
+            this.isCompacted = false;
+            this.index1 = new Uint32Array(UNEWTRIE2_INDEX_1_LENGTH);
+            this.index2 = new Uint32Array(UNEWTRIE2_MAX_INDEX_2_LENGTH);
+            /*
+             * Multi-purpose per-data-block table.
+             *
+             * Before compacting:
+             *
+             * Per-data-block reference counters/free-block list.
+             *  0: unused
+             * >0: reference counter (number of index-2 entries pointing here)
+             * <0: next free data block in free-block list
+             *
+             * While compacting:
+             *
+             * Map of adjusted indexes, used in compactData() and compactIndex2().
+             * Maps from original indexes to new ones.
+             */
+            this.map = new Uint32Array(UNEWTRIE2_MAX_DATA_LENGTH >> UTRIE2_SHIFT_2);
+            /*
+             * preallocate and reset
+             * - ASCII
+             * - the bad-UTF-8-data block
+             * - the null data block
+             */
+            var i, j;
+            for (i = 0; i < 0x80; ++i) {
+                this.data[i] = initialValue;
+            }
+            for (; i < 0xc0; ++i) {
+                this.data[i] = errorValue;
+            }
+            for (i = UNEWTRIE2_DATA_NULL_OFFSET; i < UNEWTRIE2_DATA_START_OFFSET; ++i) {
+                this.data[i] = initialValue;
+            }
+            this.dataNullOffset = UNEWTRIE2_DATA_NULL_OFFSET;
+            this.dataLength = UNEWTRIE2_DATA_START_OFFSET;
+            /* set the index-2 indexes for the 2=0x80>>UTRIE2_SHIFT_2 ASCII data blocks */
+            for (i = 0, j = 0; j < 0x80; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {
+                this.index2[i] = j;
+                this.map[i] = 1;
+            }
+            /* reference counts for the bad-UTF-8-data block */
+            for (; j < 0xc0; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {
+                this.map[i] = 0;
+            }
+            /*
+             * Reference counts for the null data block: all blocks except for the ASCII blocks.
+             * Plus 1 so that we don't drop this block during compaction.
+             * Plus as many as needed for lead surrogate code points.
+             */
+            /* i==newTrie->dataNullOffset */
+            this.map[i++] = (0x110000 >> UTRIE2_SHIFT_2) - (0x80 >> UTRIE2_SHIFT_2) + 1 + UTRIE2_LSCP_INDEX_2_LENGTH;
+            j += UTRIE2_DATA_BLOCK_LENGTH;
+            for (; j < UNEWTRIE2_DATA_START_OFFSET; ++i, j += UTRIE2_DATA_BLOCK_LENGTH) {
+                this.map[i] = 0;
+            }
+            /*
+             * set the remaining indexes in the BMP index-2 block
+             * to the null data block
+             */
+            for (i = 0x80 >> UTRIE2_SHIFT_2; i < UTRIE2_INDEX_2_BMP_LENGTH; ++i) {
+                this.index2[i] = UNEWTRIE2_DATA_NULL_OFFSET;
+            }
+            /*
+             * Fill the index gap with impossible values so that compaction
+             * does not overlap other index-2 blocks with the gap.
+             */
+            for (i = 0; i < UNEWTRIE2_INDEX_GAP_LENGTH; ++i) {
+                this.index2[UNEWTRIE2_INDEX_GAP_OFFSET + i] = -1;
+            }
+            /* set the indexes in the null index-2 block */
+            for (i = 0; i < UTRIE2_INDEX_2_BLOCK_LENGTH; ++i) {
+                this.index2[UNEWTRIE2_INDEX_2_NULL_OFFSET + i] = UNEWTRIE2_DATA_NULL_OFFSET;
+            }
+            this.index2NullOffset = UNEWTRIE2_INDEX_2_NULL_OFFSET;
+            this.index2Length = UNEWTRIE2_INDEX_2_START_OFFSET;
+            /* set the index-1 indexes for the linear index-2 block */
+            for (i = 0, j = 0; i < UTRIE2_OMITTED_BMP_INDEX_1_LENGTH; ++i, j += UTRIE2_INDEX_2_BLOCK_LENGTH) {
+                this.index1[i] = j;
+            }
+            /* set the remaining index-1 indexes to the null index-2 block */
+            for (; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {
+                this.index1[i] = UNEWTRIE2_INDEX_2_NULL_OFFSET;
+            }
+            /*
+             * Preallocate and reset data for U+0080..U+07ff,
+             * for 2-byte UTF-8 which will be compacted in 64-blocks
+             * even if UTRIE2_DATA_BLOCK_LENGTH is smaller.
+             */
+            for (i = 0x80; i < 0x800; i += UTRIE2_DATA_BLOCK_LENGTH) {
+                this.set(i, initialValue);
+            }
+        }
+        /**
+         * Set a value for a code point.
+         *
+         * @param c the code point
+         * @param value the value
+         */
+        TrieBuilder.prototype.set = function (c, value) {
+            if (c < 0 || c > 0x10ffff) {
+                throw new Error('Invalid code point.');
+            }
+            this._set(c, true, value);
+            return this;
+        };
+        /**
+         * Set a value in a range of code points [start..end].
+         * All code points c with start<=c<=end will get the value if
+         * overwrite is TRUE or if the old value is the initial value.
+         *
+         * @param start the first code point to get the value
+         * @param end the last code point to get the value (inclusive)
+         * @param value the value
+         * @param overwrite flag for whether old non-initial values are to be overwritten
+         */
+        TrieBuilder.prototype.setRange = function (start, end, value, overwrite) {
+            if (overwrite === void 0) { overwrite = false; }
+            /*
+             * repeat value in [start..end]
+             * mark index values for repeat-data blocks by setting bit 31 of the index values
+             * fill around existing values if any, if(overwrite)
+             */
+            var block, rest, repeatBlock;
+            if (start > 0x10ffff || start < 0 || end > 0x10ffff || end < 0 || start > end) {
+                throw new Error('Invalid code point range.');
+            }
+            if (!overwrite && value === this.initialValue) {
+                return this; /* nothing to do */
+            }
+            if (this.isCompacted) {
+                throw new Error('Trie was already compacted');
+            }
+            var limit = end + 1;
+            if ((start & UTRIE2_DATA_MASK) !== 0) {
+                /* set partial block at [start..following block boundary[ */
+                block = this.getDataBlock(start, true);
+                var nextStart = (start + UTRIE2_DATA_BLOCK_LENGTH) & ~UTRIE2_DATA_MASK;
+                if (nextStart <= limit) {
+                    this.fillBlock(block, start & UTRIE2_DATA_MASK, UTRIE2_DATA_BLOCK_LENGTH, value, this.initialValue, overwrite);
+                    start = nextStart;
+                }
+                else {
+                    this.fillBlock(block, start & UTRIE2_DATA_MASK, limit & UTRIE2_DATA_MASK, value, this.initialValue, overwrite);
+                    return this;
+                }
+            }
+            /* number of positions in the last, partial block */
+            rest = limit & UTRIE2_DATA_MASK;
+            /* round down limit to a block boundary */
+            limit &= ~UTRIE2_DATA_MASK;
+            /* iterate over all-value blocks */
+            repeatBlock = value === this.initialValue ? this.dataNullOffset : -1;
+            while (start < limit) {
+                var i2 = void 0;
+                var setRepeatBlock = false;
+                if (value === this.initialValue && this.isInNullBlock(start, true)) {
+                    start += UTRIE2_DATA_BLOCK_LENGTH; /* nothing to do */
+                    continue;
+                }
+                /* get index value */
+                i2 = this.getIndex2Block(start, true);
+                i2 += (start >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;
+                block = this.index2[i2];
+                if (this.isWritableBlock(block)) {
+                    /* already allocated */
+                    if (overwrite && block >= UNEWTRIE2_DATA_0800_OFFSET) {
+                        /*
+                         * We overwrite all values, and it's not a
+                         * protected (ASCII-linear or 2-byte UTF-8) block:
+                         * replace with the repeatBlock.
+                         */
+                        setRepeatBlock = true;
+                    }
+                    else {
+                        /* !overwrite, or protected block: just write the values into this block */
+                        this.fillBlock(block, 0, UTRIE2_DATA_BLOCK_LENGTH, value, this.initialValue, overwrite);
+                    }
+                }
+                else if (this.data[block] !== value && (overwrite || block === this.dataNullOffset)) {
+                    /*
+                     * Set the repeatBlock instead of the null block or previous repeat block:
+                     *
+                     * If !isWritableBlock() then all entries in the block have the same value
+                     * because it's the null block or a range block (the repeatBlock from a previous
+                     * call to utrie2_setRange32()).
+                     * No other blocks are used multiple times before compacting.
+                     *
+                     * The null block is the only non-writable block with the initialValue because
+                     * of the repeatBlock initialization above. (If value==initialValue, then
+                     * the repeatBlock will be the null data block.)
+                     *
+                     * We set our repeatBlock if the desired value differs from the block's value,
+                     * and if we overwrite any data or if the data is all initial values
+                     * (which is the same as the block being the null block, see above).
+                     */
+                    setRepeatBlock = true;
+                }
+                if (setRepeatBlock) {
+                    if (repeatBlock >= 0) {
+                        this.setIndex2Entry(i2, repeatBlock);
+                    }
+                    else {
+                        /* create and set and fill the repeatBlock */
+                        repeatBlock = this.getDataBlock(start, true);
+                        this.writeBlock(repeatBlock, value);
+                    }
+                }
+                start += UTRIE2_DATA_BLOCK_LENGTH;
+            }
+            if (rest > 0) {
+                /* set partial block at [last block boundary..limit[ */
+                block = this.getDataBlock(start, true);
+                this.fillBlock(block, 0, rest, value, this.initialValue, overwrite);
+            }
+            return this;
+        };
+        /**
+         * Get the value for a code point as stored in the Trie2.
+         *
+         * @param codePoint the code point
+         * @return the value
+         */
+        TrieBuilder.prototype.get = function (codePoint) {
+            if (codePoint < 0 || codePoint > 0x10ffff) {
+                return this.errorValue;
+            }
+            else {
+                return this._get(codePoint, true);
+            }
+        };
+        TrieBuilder.prototype._get = function (c, fromLSCP) {
+            var i2;
+            if (c >= this.highStart && (!(c >= 0xd800 && c < 0xdc00) || fromLSCP)) {
+                return this.data[this.dataLength - UTRIE2_DATA_GRANULARITY];
+            }
+            if (c >= 0xd800 && c < 0xdc00 && fromLSCP) {
+                i2 = UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> UTRIE2_SHIFT_2) + (c >> UTRIE2_SHIFT_2);
+            }
+            else {
+                i2 = this.index1[c >> UTRIE2_SHIFT_1] + ((c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK);
+            }
+            var block = this.index2[i2];
+            return this.data[block + (c & UTRIE2_DATA_MASK)];
+        };
+        TrieBuilder.prototype.freeze = function (valueBits) {
+            if (valueBits === void 0) { valueBits = BITS_32; }
+            var i;
+            var allIndexesLength;
+            var dataMove; /* >0 if the data is moved to the end of the index array */
+            /* compact if necessary */
+            if (!this.isCompacted) {
+                this.compactTrie();
+            }
+            allIndexesLength = this.highStart <= 0x10000 ? UTRIE2_INDEX_1_OFFSET : this.index2Length;
+            if (valueBits === BITS_16) {
+                // dataMove = allIndexesLength;
+                dataMove = 0;
+            }
+            else {
+                dataMove = 0;
+            }
+            /* are indexLength and dataLength within limits? */
+            if (
+            /* for unshifted indexLength */
+            allIndexesLength > UTRIE2_MAX_INDEX_LENGTH ||
+                /* for unshifted dataNullOffset */
+                dataMove + this.dataNullOffset > 0xffff ||
+                /* for unshifted 2-byte UTF-8 index-2 values */
+                dataMove + UNEWTRIE2_DATA_0800_OFFSET > 0xffff ||
+                /* for shiftedDataLength */
+                dataMove + this.dataLength > UTRIE2_MAX_DATA_LENGTH) {
+                throw new Error('Trie data is too large.');
+            }
+            var index = new Uint16Array(allIndexesLength);
+            /* write the index-2 array values shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove */
+            var destIdx = 0;
+            for (i = 0; i < UTRIE2_INDEX_2_BMP_LENGTH; i++) {
+                index[destIdx++] = (this.index2[i] + dataMove) >> UTRIE2_INDEX_SHIFT;
+            }
+            /* write UTF-8 2-byte index-2 values, not right-shifted */
+            for (i = 0; i < 0xc2 - 0xc0; ++i) {
+                /* C0..C1 */
+                index[destIdx++] = dataMove + UTRIE2_BAD_UTF8_DATA_OFFSET;
+            }
+            for (; i < 0xe0 - 0xc0; ++i) {
+                /* C2..DF */
+                index[destIdx++] = dataMove + this.index2[i << (6 - UTRIE2_SHIFT_2)];
+            }
+            if (this.highStart > 0x10000) {
+                var index1Length = (this.highStart - 0x10000) >> UTRIE2_SHIFT_1;
+                var index2Offset = UTRIE2_INDEX_2_BMP_LENGTH + UTRIE2_UTF8_2B_INDEX_2_LENGTH + index1Length;
+                /* write 16-bit index-1 values for supplementary code points */
+                for (i = 0; i < index1Length; i++) {
+                    index[destIdx++] = UTRIE2_INDEX_2_OFFSET + this.index1[i + UTRIE2_OMITTED_BMP_INDEX_1_LENGTH];
+                }
+                /*
+                 * write the index-2 array values for supplementary code points,
+                 * shifted right by UTRIE2_INDEX_SHIFT, after adding dataMove
+                 */
+                for (i = 0; i < this.index2Length - index2Offset; i++) {
+                    index[destIdx++] = (dataMove + this.index2[index2Offset + i]) >> UTRIE2_INDEX_SHIFT;
+                }
+            }
+            /* write the 16/32-bit data array */
+            switch (valueBits) {
+                case BITS_16:
+                    /* write 16-bit data values */
+                    var data16 = new Uint16Array(this.dataLength);
+                    for (i = 0; i < this.dataLength; i++) {
+                        data16[i] = this.data[i];
+                    }
+                    return new Trie(this.initialValue, this.errorValue, this.highStart, dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY, index, data16);
+                case BITS_32:
+                    /* write 32-bit data values */
+                    var data32 = new Uint32Array(this.dataLength);
+                    for (i = 0; i < this.dataLength; i++) {
+                        data32[i] = this.data[i];
+                    }
+                    return new Trie(this.initialValue, this.errorValue, this.highStart, dataMove + this.dataLength - UTRIE2_DATA_GRANULARITY, index, data32);
+                default:
+                    throw new Error('Bits should be either 16 or 32');
+            }
+        };
+        /*
+         * Find the start of the last range in the trie by enumerating backward.
+         * Indexes for supplementary code points higher than this will be omitted.
+         */
+        TrieBuilder.prototype.findHighStart = function (highValue) {
+            var value;
+            var i2, j, i2Block, prevI2Block, block, prevBlock;
+            /* set variables for previous range */
+            if (highValue === this.initialValue) {
+                prevI2Block = this.index2NullOffset;
+                prevBlock = this.dataNullOffset;
+            }
+            else {
+                prevI2Block = -1;
+                prevBlock = -1;
+            }
+            var prev = 0x110000;
+            /* enumerate index-2 blocks */
+            var i1 = UNEWTRIE2_INDEX_1_LENGTH;
+            var c = prev;
+            while (c > 0) {
+                i2Block = this.index1[--i1];
+                if (i2Block === prevI2Block) {
+                    /* the index-2 block is the same as the previous one, and filled with highValue */
+                    c -= UTRIE2_CP_PER_INDEX_1_ENTRY;
+                    continue;
+                }
+                prevI2Block = i2Block;
+                if (i2Block === this.index2NullOffset) {
+                    /* this is the null index-2 block */
+                    if (highValue !== this.initialValue) {
+                        return c;
+                    }
+                    c -= UTRIE2_CP_PER_INDEX_1_ENTRY;
+                }
+                else {
+                    /* enumerate data blocks for one index-2 block */
+                    for (i2 = UTRIE2_INDEX_2_BLOCK_LENGTH; i2 > 0;) {
+                        block = this.index2[i2Block + --i2];
+                        if (block === prevBlock) {
+                            /* the block is the same as the previous one, and filled with highValue */
+                            c -= UTRIE2_DATA_BLOCK_LENGTH;
+                            continue;
+                        }
+                        prevBlock = block;
+                        if (block === this.dataNullOffset) {
+                            /* this is the null data block */
+                            if (highValue !== this.initialValue) {
+                                return c;
+                            }
+                            c -= UTRIE2_DATA_BLOCK_LENGTH;
+                        }
+                        else {
+                            for (j = UTRIE2_DATA_BLOCK_LENGTH; j > 0;) {
+                                value = this.data[block + --j];
+                                if (value !== highValue) {
+                                    return c;
+                                }
+                                --c;
+                            }
+                        }
+                    }
+                }
+            }
+            /* deliver last range */
+            return 0;
+        };
+        /*
+         * Compact a build-time trie.
+         *
+         * The compaction
+         * - removes blocks that are identical with earlier ones
+         * - overlaps adjacent blocks as much as possible (if overlap==TRUE)
+         * - moves blocks in steps of the data granularity
+         * - moves and overlaps blocks that overlap with multiple values in the overlap region
+         *
+         * It does not
+         * - try to move and overlap blocks that are not already adjacent
+         */
+        TrieBuilder.prototype.compactData = function () {
+            var start, movedStart;
+            var blockLength, overlap;
+            var i, mapIndex, blockCount;
+            /* do not compact linear-ASCII data */
+            var newStart = UTRIE2_DATA_START_OFFSET;
+            for (start = 0, i = 0; start < newStart; start += UTRIE2_DATA_BLOCK_LENGTH, ++i) {
+                this.map[i] = start;
+            }
+            /*
+             * Start with a block length of 64 for 2-byte UTF-8,
+             * then switch to UTRIE2_DATA_BLOCK_LENGTH.
+             */
+            blockLength = 64;
+            blockCount = blockLength >> UTRIE2_SHIFT_2;
+            for (start = newStart; start < this.dataLength;) {
+                /*
+                 * start: index of first entry of current block
+                 * newStart: index where the current block is to be moved
+                 *           (right after current end of already-compacted data)
+                 */
+                if (start === UNEWTRIE2_DATA_0800_OFFSET) {
+                    blockLength = UTRIE2_DATA_BLOCK_LENGTH;
+                    blockCount = 1;
+                }
+                /* skip blocks that are not used */
+                if (this.map[start >> UTRIE2_SHIFT_2] <= 0) {
+                    /* advance start to the next block */
+                    start += blockLength;
+                    /* leave newStart with the previous block! */
+                    continue;
+                }
+                /* search for an identical block */
+                movedStart = this.findSameDataBlock(newStart, start, blockLength);
+                if (movedStart >= 0) {
+                    /* found an identical block, set the other block's index value for the current block */
+                    for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {
+                        this.map[mapIndex++] = movedStart;
+                        movedStart += UTRIE2_DATA_BLOCK_LENGTH;
+                    }
+                    /* advance start to the next block */
+                    start += blockLength;
+                    /* leave newStart with the previous block! */
+                    continue;
+                }
+                /* see if the beginning of this block can be overlapped with the end of the previous block */
+                /* look for maximum overlap (modulo granularity) with the previous, adjacent block */
+                for (overlap = blockLength - UTRIE2_DATA_GRANULARITY; overlap > 0 && !equalInt(this.data, newStart - overlap, start, overlap); overlap -= UTRIE2_DATA_GRANULARITY) { }
+                if (overlap > 0 || newStart < start) {
+                    /* some overlap, or just move the whole block */
+                    movedStart = newStart - overlap;
+                    for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {
+                        this.map[mapIndex++] = movedStart;
+                        movedStart += UTRIE2_DATA_BLOCK_LENGTH;
+                    }
+                    /* move the non-overlapping indexes to their new positions */
+                    start += overlap;
+                    for (i = blockLength - overlap; i > 0; --i) {
+                        this.data[newStart++] = this.data[start++];
+                    }
+                }
+                else {
+                    /* no overlap && newStart==start */
+                    for (i = blockCount, mapIndex = start >> UTRIE2_SHIFT_2; i > 0; --i) {
+                        this.map[mapIndex++] = start;
+                        start += UTRIE2_DATA_BLOCK_LENGTH;
+                    }
+                    newStart = start;
+                }
+            }
+            /* now adjust the index-2 table */
+            for (i = 0; i < this.index2Length; ++i) {
+                if (i === UNEWTRIE2_INDEX_GAP_OFFSET) {
+                    /* Gap indexes are invalid (-1). Skip over the gap. */
+                    i += UNEWTRIE2_INDEX_GAP_LENGTH;
+                }
+                this.index2[i] = this.map[this.index2[i] >> UTRIE2_SHIFT_2];
+            }
+            this.dataNullOffset = this.map[this.dataNullOffset >> UTRIE2_SHIFT_2];
+            /* ensure dataLength alignment */
+            while ((newStart & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {
+                this.data[newStart++] = this.initialValue;
+            }
+            this.dataLength = newStart;
+        };
+        TrieBuilder.prototype.findSameDataBlock = function (dataLength, otherBlock, blockLength) {
+            var block = 0;
+            /* ensure that we do not even partially get past dataLength */
+            dataLength -= blockLength;
+            for (; block <= dataLength; block += UTRIE2_DATA_GRANULARITY) {
+                if (equalInt(this.data, block, otherBlock, blockLength)) {
+                    return block;
+                }
+            }
+            return -1;
+        };
+        TrieBuilder.prototype.compactTrie = function () {
+            var highValue = this.get(0x10ffff);
+            /* find highStart and round it up */
+            var localHighStart = this.findHighStart(highValue);
+            localHighStart = (localHighStart + (UTRIE2_CP_PER_INDEX_1_ENTRY - 1)) & ~(UTRIE2_CP_PER_INDEX_1_ENTRY - 1);
+            if (localHighStart === 0x110000) {
+                highValue = this.errorValue;
+            }
+            /*
+             * Set trie->highStart only after utrie2_get32(trie, highStart).
+             * Otherwise utrie2_get32(trie, highStart) would try to read the highValue.
+             */
+            this.highStart = localHighStart;
+            if (this.highStart < 0x110000) {
+                /* Blank out [highStart..10ffff] to release associated data blocks. */
+                var suppHighStart = this.highStart <= 0x10000 ? 0x10000 : this.highStart;
+                this.setRange(suppHighStart, 0x10ffff, this.initialValue, true);
+            }
+            this.compactData();
+            if (this.highStart > 0x10000) {
+                this.compactIndex2();
+            }
+            /*
+             * Store the highValue in the data array and round up the dataLength.
+             * Must be done after compactData() because that assumes that dataLength
+             * is a multiple of UTRIE2_DATA_BLOCK_LENGTH.
+             */
+            this.data[this.dataLength++] = highValue;
+            while ((this.dataLength & (UTRIE2_DATA_GRANULARITY - 1)) !== 0) {
+                this.data[this.dataLength++] = this.initialValue;
+            }
+            this.isCompacted = true;
+        };
+        TrieBuilder.prototype.compactIndex2 = function () {
+            var i, start, movedStart, overlap;
+            /* do not compact linear-BMP index-2 blocks */
+            var newStart = UTRIE2_INDEX_2_BMP_LENGTH;
+            for (start = 0, i = 0; start < newStart; start += UTRIE2_INDEX_2_BLOCK_LENGTH, ++i) {
+                this.map[i] = start;
+            }
+            /* Reduce the index table gap to what will be needed at runtime. */
+            newStart += UTRIE2_UTF8_2B_INDEX_2_LENGTH + ((this.highStart - 0x10000) >> UTRIE2_SHIFT_1);
+            for (start = UNEWTRIE2_INDEX_2_NULL_OFFSET; start < this.index2Length;) {
+                /*
+                 * start: index of first entry of current block
+                 * newStart: index where the current block is to be moved
+                 *           (right after current end of already-compacted data)
+                 */
+                /* search for an identical block */
+                if ((movedStart = this.findSameIndex2Block(newStart, start)) >= 0) {
+                    /* found an identical block, set the other block's index value for the current block */
+                    this.map[start >> UTRIE2_SHIFT_1_2] = movedStart;
+                    /* advance start to the next block */
+                    start += UTRIE2_INDEX_2_BLOCK_LENGTH;
+                    /* leave newStart with the previous block! */
+                    continue;
+                }
+                /* see if the beginning of this block can be overlapped with the end of the previous block */
+                /* look for maximum overlap with the previous, adjacent block */
+                for (overlap = UTRIE2_INDEX_2_BLOCK_LENGTH - 1; overlap > 0 && !equalInt(this.index2, newStart - overlap, start, overlap); --overlap) { }
+                if (overlap > 0 || newStart < start) {
+                    /* some overlap, or just move the whole block */
+                    this.map[start >> UTRIE2_SHIFT_1_2] = newStart - overlap;
+                    /* move the non-overlapping indexes to their new positions */
+                    start += overlap;
+                    for (i = UTRIE2_INDEX_2_BLOCK_LENGTH - overlap; i > 0; --i) {
+                        this.index2[newStart++] = this.index2[start++];
+                    }
+                }
+                else {
+                    /* no overlap && newStart==start */ this.map[start >> UTRIE2_SHIFT_1_2] = start;
+                    start += UTRIE2_INDEX_2_BLOCK_LENGTH;
+                    newStart = start;
+                }
+            }
+            /* now adjust the index-1 table */
+            for (i = 0; i < UNEWTRIE2_INDEX_1_LENGTH; ++i) {
+                this.index1[i] = this.map[this.index1[i] >> UTRIE2_SHIFT_1_2];
+            }
+            this.index2NullOffset = this.map[this.index2NullOffset >> UTRIE2_SHIFT_1_2];
+            /*
+             * Ensure data table alignment:
+             * Needs to be granularity-aligned for 16-bit trie
+             * (so that dataMove will be down-shiftable),
+             * and 2-aligned for uint32_t data.
+             */
+            while ((newStart & ((UTRIE2_DATA_GRANULARITY - 1) | 1)) !== 0) {
+                /* Arbitrary value: 0x3fffc not possible for real data. */
+                this.index2[newStart++] = 0x0000ffff << UTRIE2_INDEX_SHIFT;
+            }
+            this.index2Length = newStart;
+        };
+        TrieBuilder.prototype.findSameIndex2Block = function (index2Length, otherBlock) {
+            /* ensure that we do not even partially get past index2Length */
+            index2Length -= UTRIE2_INDEX_2_BLOCK_LENGTH;
+            for (var block = 0; block <= index2Length; ++block) {
+                if (equalInt(this.index2, block, otherBlock, UTRIE2_INDEX_2_BLOCK_LENGTH)) {
+                    return block;
+                }
+            }
+            return -1;
+        };
+        TrieBuilder.prototype._set = function (c, forLSCP, value) {
+            if (this.isCompacted) {
+                throw new Error('Trie was already compacted');
+            }
+            var block = this.getDataBlock(c, forLSCP);
+            this.data[block + (c & UTRIE2_DATA_MASK)] = value;
+            return this;
+        };
+        TrieBuilder.prototype.writeBlock = function (block, value) {
+            var limit = block + UTRIE2_DATA_BLOCK_LENGTH;
+            while (block < limit) {
+                this.data[block++] = value;
+            }
+        };
+        TrieBuilder.prototype.isInNullBlock = function (c, forLSCP) {
+            var i2 = isHighSurrogate(c) && forLSCP
+                ? UTRIE2_LSCP_INDEX_2_OFFSET - (0xd800 >> UTRIE2_SHIFT_2) + (c >> UTRIE2_SHIFT_2)
+                : this.index1[c >> UTRIE2_SHIFT_1] + ((c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK);
+            var block = this.index2[i2];
+            return block === this.dataNullOffset;
+        };
+        TrieBuilder.prototype.fillBlock = function (block, start, limit, value, initialValue, overwrite) {
+            var pLimit = block + limit;
+            if (overwrite) {
+                for (var i = block + start; i < pLimit; i++) {
+                    this.data[i] = value;
+                }
+            }
+            else {
+                for (var i = block + start; i < pLimit; i++) {
+                    if (this.data[i] === initialValue) {
+                        this.data[i] = value;
+                    }
+                }
+            }
+        };
+        TrieBuilder.prototype.setIndex2Entry = function (i2, block) {
+            ++this.map[block >> UTRIE2_SHIFT_2]; /* increment first, in case block==oldBlock! */
+            var oldBlock = this.index2[i2];
+            if (0 === --this.map[oldBlock >> UTRIE2_SHIFT_2]) {
+                this.releaseDataBlock(oldBlock);
+            }
+            this.index2[i2] = block;
+        };
+        TrieBuilder.prototype.releaseDataBlock = function (block) {
+            /* put this block at the front of the free-block chain */
+            this.map[block >> UTRIE2_SHIFT_2] = -this.firstFreeBlock;
+            this.firstFreeBlock = block;
+        };
+        TrieBuilder.prototype.getDataBlock = function (c, forLSCP) {
+            var i2 = this.getIndex2Block(c, forLSCP);
+            i2 += (c >> UTRIE2_SHIFT_2) & UTRIE2_INDEX_2_MASK;
+            var oldBlock = this.index2[i2];
+            if (this.isWritableBlock(oldBlock)) {
+                return oldBlock;
+            }
+            /* allocate a new data block */
+            var newBlock = this.allocDataBlock(oldBlock);
+            this.setIndex2Entry(i2, newBlock);
+            return newBlock;
+        };
+        TrieBuilder.prototype.isWritableBlock = function (block) {
+            return block !== this.dataNullOffset && 1 === this.map[block >> UTRIE2_SHIFT_2];
+        };
+        TrieBuilder.prototype.getIndex2Block = function (c, forLSCP) {
+            if (c >= 0xd800 && c < 0xdc00 && forLSCP) {
+                return UTRIE2_LSCP_INDEX_2_OFFSET;
+            }
+            var i1 = c >> UTRIE2_SHIFT_1;
+            var i2 = this.index1[i1];
+            if (i2 === this.index2NullOffset) {
+                i2 = this.allocIndex2Block();
+                this.index1[i1] = i2;
+            }
+            return i2;
+        };
+        TrieBuilder.prototype.allocDataBlock = function (copyBlock) {
+            var newBlock;
+            if (this.firstFreeBlock !== 0) {
+                /* get the first free block */
+                newBlock = this.firstFreeBlock;
+                this.firstFreeBlock = -this.map[newBlock >> UTRIE2_SHIFT_2];
+            }
+            else {
+                /* get a new block from the high end */
+                newBlock = this.dataLength;
+                var newTop = newBlock + UTRIE2_DATA_BLOCK_LENGTH;
+                if (newTop > this.dataCapacity) {
+                    var capacity = void 0;
+                    /* out of memory in the data array */
+                    if (this.dataCapacity < UNEWTRIE2_MEDIUM_DATA_LENGTH) {
+                        capacity = UNEWTRIE2_MEDIUM_DATA_LENGTH;
+                    }
+                    else if (this.dataCapacity < UNEWTRIE2_MAX_DATA_LENGTH) {
+                        capacity = UNEWTRIE2_MAX_DATA_LENGTH;
+                    }
+                    else {
+                        /*
+                         * Should never occur.
+                         * Either UNEWTRIE2_MAX_DATA_LENGTH is incorrect,
+                         * or the code writes more values than should be possible.
+                         */
+                        throw new Error('Internal error in Trie creation.');
+                    }
+                    var newData = new Uint32Array(capacity);
+                    newData.set(this.data.subarray(0, this.dataLength));
+                    this.data = newData;
+                    this.dataCapacity = capacity;
+                }
+                this.dataLength = newTop;
+            }
+            this.data.set(this.data.subarray(copyBlock, copyBlock + UTRIE2_DATA_BLOCK_LENGTH), newBlock);
+            this.map[newBlock >> UTRIE2_SHIFT_2] = 0;
+            return newBlock;
+        };
+        TrieBuilder.prototype.allocIndex2Block = function () {
+            var newBlock = this.index2Length;
+            var newTop = newBlock + UTRIE2_INDEX_2_BLOCK_LENGTH;
+            if (newTop > this.index2.length) {
+                throw new Error('Internal error in Trie creation.');
+                /*
+                 * Should never occur.
+                 * Either UTRIE2_MAX_BUILD_TIME_INDEX_LENGTH is incorrect,
+                 * or the code writes more values than should be possible.
+                 */
+            }
+            this.index2Length = newTop;
+            this.index2.set(this.index2.subarray(this.index2NullOffset, this.index2NullOffset + UTRIE2_INDEX_2_BLOCK_LENGTH), newBlock);
+            return newBlock;
+        };
+        return TrieBuilder;
+    }());
+    var serializeBase64 = function (trie) {
+        var index = trie.index;
+        var data = trie.data;
+        if (!(index instanceof Uint16Array) || !(data instanceof Uint16Array || data instanceof Uint32Array)) {
+            throw new Error('TrieBuilder serializer only support TypedArrays');
+        }
+        var headerLength = Uint32Array.BYTES_PER_ELEMENT * 6;
+        var bufferLength = headerLength + index.byteLength + data.byteLength;
+        var buffer = new ArrayBuffer(Math.ceil(bufferLength / 4) * 4);
+        var view32 = new Uint32Array(buffer);
+        var view16 = new Uint16Array(buffer);
+        view32[0] = trie.initialValue;
+        view32[1] = trie.errorValue;
+        view32[2] = trie.highStart;
+        view32[3] = trie.highValueIndex;
+        view32[4] = index.byteLength;
+        // $FlowFixMe
+        view32[5] = data.BYTES_PER_ELEMENT;
+        view16.set(index, headerLength / Uint16Array.BYTES_PER_ELEMENT);
+        if (data.BYTES_PER_ELEMENT === Uint16Array.BYTES_PER_ELEMENT) {
+            view16.set(data, (headerLength + index.byteLength) / Uint16Array.BYTES_PER_ELEMENT);
+        }
+        else {
+            view32.set(data, Math.ceil((headerLength + index.byteLength) / Uint32Array.BYTES_PER_ELEMENT));
+        }
+        return [encode(new Uint8Array(buffer)), buffer.byteLength];
+    };
+
+    exports.Trie = Trie;
+    exports.TrieBuilder = TrieBuilder;
+    exports.createTrieFromBase64 = createTrieFromBase64;
+    exports.serializeBase64 = serializeBase64;
+
+    Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+//# sourceMappingURL=utrie.umd.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/utrie/dist/utrie.umd.js.map


+ 79 - 0
node_modules/utrie/package.json

@@ -0,0 +1,79 @@
+{
+  "_from": "utrie@^1.0.2",
+  "_id": "utrie@1.0.2",
+  "_inBundle": false,
+  "_integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
+  "_location": "/utrie",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "utrie@^1.0.2",
+    "name": "utrie",
+    "escapedName": "utrie",
+    "rawSpec": "^1.0.2",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.2"
+  },
+  "_requiredBy": [
+    "/html2canvas/css-line-break",
+    "/text-segmentation"
+  ],
+  "_resolved": "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz",
+  "_shasum": "d42fe44de9bc0119c25de7f564a6ed1b2c87a645",
+  "_spec": "utrie@^1.0.2",
+  "_where": "C:\\Users\\Administrator\\Desktop\\zgcx\\node_modules\\html2canvas\\node_modules\\css-line-break",
+  "author": {
+    "name": "Niklas von Hertzen",
+    "email": "niklasvh@gmail.com",
+    "url": "https://hertzen.com"
+  },
+  "bugs": {
+    "url": "https://github.com/niklasvh/utrie/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "base64-arraybuffer": "^1.0.2"
+  },
+  "deprecated": false,
+  "description": "Unicode Trie",
+  "devDependencies": {
+    "@rollup/plugin-commonjs": "^19.0.0",
+    "@rollup/plugin-node-resolve": "^13.0.0",
+    "@rollup/plugin-typescript": "^8.2.1",
+    "@types/mocha": "^8.2.2",
+    "@types/node": "^16.0.0",
+    "mocha": "9.0.2",
+    "prettier": "^2.3.2",
+    "rimraf": "3.0.2",
+    "rollup": "^2.52.7",
+    "rollup-plugin-json": "^4.0.0",
+    "rollup-plugin-sourcemaps": "^0.6.3",
+    "standard-version": "^9.3.0",
+    "ts-node": "^10.0.0",
+    "tslib": "^2.3.0",
+    "tslint": "^6.1.3",
+    "tslint-config-prettier": "^1.18.0",
+    "typescript": "^4.3.5"
+  },
+  "homepage": "https://github.com/niklasvh/utrie",
+  "license": "MIT",
+  "main": "dist/utrie.umd.js",
+  "module": "dist/utrie.es5.js",
+  "name": "utrie",
+  "repository": {
+    "type": "git",
+    "url": "git+ssh://git@github.com/niklasvh/utrie.git"
+  },
+  "scripts": {
+    "build": "tsc --module commonjs && rollup -c rollup.config.ts",
+    "format": "prettier --write \"{src,scripts}/**/*.ts\"",
+    "lint": "tslint -c tslint.json --project tsconfig.json -t codeFrame src/**/*.ts tests/**/*.ts scripts/**/*.ts",
+    "mocha": "mocha --require ts-node/register tests/*.ts",
+    "prebuild": "rimraf dist/",
+    "release": "standard-version",
+    "test": "npm run lint && npm run mocha"
+  },
+  "typings": "dist/types/index.d.ts",
+  "version": "1.0.2"
+}

+ 40 - 0
node_modules/utrie/rollup.config.ts

@@ -0,0 +1,40 @@
+import resolve from '@rollup/plugin-node-resolve';
+import commonjs from '@rollup/plugin-commonjs';
+import sourceMaps from 'rollup-plugin-sourcemaps';
+import typescript from '@rollup/plugin-typescript';
+import json from 'rollup-plugin-json';
+
+const pkg = require('./package.json');
+
+const banner = `/*
+ * ${pkg.name} ${pkg.version} <${pkg.homepage}>
+ * Copyright (c) ${(new Date()).getFullYear()} ${pkg.author.name} <${pkg.author.url}>
+ * Released under ${pkg.license} License
+ */`;
+
+export default {
+    input: `src/index.ts`,
+    output: [
+        { file: pkg.main, name: pkg.name, format: 'umd', banner, sourcemap: true },
+        { file: pkg.module, format: 'esm', banner, sourcemap: true },
+    ],
+    external: [],
+    watch: {
+        include: 'src/**',
+    },
+    plugins: [
+        // Allow node_modules resolution, so you can use 'external' to control
+        // which external modules to include in the bundle
+        // https://github.com/rollup/rollup-plugin-node-resolve#usage
+        resolve(),
+        // Allow json resolution
+        json(),
+        // Compile TypeScript files
+        typescript({ sourceMap: true, inlineSources: true }),
+        // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
+        commonjs(),
+
+        // Resolve source maps to the original source
+        sourceMaps(),
+    ],
+}

+ 0 - 0
node_modules/vue-amap/CHANGELOG.md


+ 21 - 0
node_modules/vue-amap/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 饿了么前端
+
+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.

+ 156 - 0
node_modules/vue-amap/README.md

@@ -0,0 +1,156 @@
+<p align="center">
+  <img src="https://cdn.rawgit.com/ElemeFE/vue-amap/master/src/docs/assets/images/logo.png">
+</p>
+
+# vue-amap
+[![Build Status](https://travis-ci.org/ElemeFE/vue-amap.svg?branch=master)](https://travis-ci.org/ElemeFE/vue-amap)
+[![npm package](https://img.shields.io/npm/v/vue-amap.svg)](https://www.npmjs.org/package/vue-amap)
+[![NPM downloads](http://img.shields.io/npm/dm/vue-amap.svg)](https://npmjs.org/package/vue-amap)
+![JS gzip size](http://img.badgesize.io/https://unpkg.com/vue-amap/src/lib/index.js?compression=gzip&label=gzip%20size:%20JS)
+[![license](https://img.shields.io/github/license/elemefe/vue-amap.svg?style=flat-square)](https://github.com/ElemeFE/vue-amap)
+[![GitHub stars](https://img.shields.io/github/stars/elemefe/vue-amap.svg?style=social&label=Star)](https://github.com/ElemeFE/vue-amap)
+
+> vue-amap是一套基于Vue 2.0和高德地图的地图组件。
+
+## 安装
+```
+npm install -S vue-amap
+```
+
+## 文档
+[https://elemefe.github.io/vue-amap](https://elemefe.github.io/vue-amap)
+
+
+## 快速上手
+
+引入vue-amap
+
+```javascript
+// 引入vue-amap
+import VueAMap from 'vue-amap';
+Vue.use(VueAMap);
+
+// 初始化vue-amap
+VueAMap.initAMapApiLoader({
+  // 高德的key
+  key: 'YOUR_KEY',
+  // 插件集合
+  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
+  // 高德 sdk 版本,默认为 1.4.4
+  v: '1.4.4'
+});
+```
+
+## 组件
+
+### 地图
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+</el-amap>
+```
+
+### 点坐标
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-marker v-for="marker in markers" :position="marker.position"></el-amap-marker>
+</el-amap>
+```
+
+### 折线
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-polyline :path="polyline.path"></el-amap-polyline>
+</el-amap>
+```
+
+### 多边形
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-polygon v-for="polygon in polygons" :path="polygon.path" :events="polygon.events"></el-amap-polygon>
+</el-amap>
+```
+
+### 圆
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-circle v-for="circle in circles" :center="circle.center" :radius="circle.radius"></el-amap-circle>
+</el-amap>
+```
+
+### 图片覆盖物
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-ground-image v-for="groundimage in groundimages" :url="groundimage.url"></el-amap-ground-image>
+</el-amap>
+```
+
+### 文本
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-text v-for="text in texts"></el-amap-text>
+</el-amap>
+```
+
+### 贝塞尔曲线
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-bezier-curve v-for="line in lines"></el-amap-bezier-curve>
+</el-amap>
+```
+
+### 圆点标记
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-circle-marker v-for="marker in markers"></el-amap-circle-marker>
+</el-amap>
+```
+
+### 椭圆
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-ellipse v-for="ellipse in ellipses"></el-amap-ellipse>
+</el-amap>
+```
+
+### 矩形
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-rectangle v-for="rectangle in rectangles"></el-amap-rectangle>
+</el-amap>
+```
+
+### 信息窗体
+
+```vue
+<el-amap vid="amapDemo" :zoom="zoom" :center="center">
+  <el-amap-info-window v-for="window in windows" :position="window.position" :content="window.content" :open="window.open"></el-amap-info-window>
+</el-amap>
+```
+
+### Search-Box
+
+```vue
+<el-amap-search-box class="search-box" :search-option="searchOption" :on-search-result="onSearchResult"></el-amap-search-box>
+<el-amap vid="amapDemo">
+</el-amap>
+```
+
+### 其他特性
+
+* 支持自定义组件
+* 支持官方 UI 组件库
+
+## 反馈
+
+文档被大家吐槽了挺久,这段时间,针对大家的问题,对文档进行了一次升级。后续将重点持续完善「示例中心」,如果大家在使用过程中,遇到了些问题,欢迎提 issue,我们将根据大家的反馈,逐渐充实「示例中心」,更好地为大家服务。

File diff suppressed because it is too large
+ 0 - 0
node_modules/vue-amap/dist/index.js


File diff suppressed because it is too large
+ 0 - 0
node_modules/vue-amap/dist/index.js.map


+ 142 - 0
node_modules/vue-amap/package.json

@@ -0,0 +1,142 @@
+{
+  "_from": "vue-amap",
+  "_id": "vue-amap@0.5.10",
+  "_inBundle": false,
+  "_integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
+  "_location": "/vue-amap",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "tag",
+    "registry": true,
+    "raw": "vue-amap",
+    "name": "vue-amap",
+    "escapedName": "vue-amap",
+    "rawSpec": "",
+    "saveSpec": null,
+    "fetchSpec": "latest"
+  },
+  "_requiredBy": [
+    "#USER",
+    "/"
+  ],
+  "_resolved": "https://registry.npmmirror.com/vue-amap/-/vue-amap-0.5.10.tgz",
+  "_shasum": "464516203af0c085d404bd8acabf2401e4a36ff6",
+  "_spec": "vue-amap",
+  "_where": "C:\\Users\\Administrator\\Desktop\\zgcx",
+  "author": {
+    "name": "elemefe"
+  },
+  "bugs": {
+    "url": "https://github.com/ElemeFE/vue-amap/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "uppercamelcase": "^1.1.0"
+  },
+  "deprecated": false,
+  "description": "vue amap",
+  "devDependencies": {
+    "autoprefixer": "^6.4.0",
+    "babel-core": "^6.26.0",
+    "babel-eslint": "^7.1.1",
+    "babel-loader": "^7.1.2",
+    "babel-plugin-transform-object-rest-spread": "^6.26.0",
+    "babel-plugin-transform-runtime": "^6.0.0",
+    "babel-preset-env": "^1.6.1",
+    "babel-runtime": "^6.26.0",
+    "chai": "^3.5.0",
+    "connect-history-api-fallback": "^1.4.0",
+    "copy-webpack-plugin": "^4.2.0",
+    "cross-env": "^3.1.3",
+    "cross-spawn": "^4.0.2",
+    "css-loader": "^0.28.7",
+    "eslint": "^3.7.1",
+    "eslint-config-elemefe": "^0.1.1",
+    "eslint-config-standard": "^6.1.0",
+    "eslint-friendly-formatter": "^2.0.5",
+    "eslint-loader": "^1.5.0",
+    "eslint-plugin-html": "^1.3.0",
+    "eslint-plugin-promise": "^3.6.0",
+    "eslint-plugin-standard": "^2.0.1",
+    "eslint-plugin-vue": "^1.0.0",
+    "eventsource-polyfill": "^0.9.6",
+    "express": "^4.16.2",
+    "extract-text-webpack-plugin": "^2.0.0",
+    "fast-deep-equal": "^1.0.0",
+    "file-loader": "^0.9.0",
+    "friendly-errors-webpack-plugin": "^1.1.3",
+    "function-bind": "^1.1.1",
+    "html-webpack-plugin": "^2.30.1",
+    "http-proxy-middleware": "^0.17.2",
+    "husky": "^0.14.3",
+    "inject-loader": "^2.0.1",
+    "karma": "^1.7.1",
+    "karma-chrome-launcher": "^2.2.0",
+    "karma-coverage": "^1.1.1",
+    "karma-mocha": "^1.3.0",
+    "karma-sinon-chai": "^1.3.2",
+    "karma-sourcemap-loader": "^0.3.7",
+    "karma-spec-reporter": "0.0.26",
+    "karma-webpack": "^2.0.5",
+    "less": "^2.7.3",
+    "less-loader": "^4.0.5",
+    "lolex": "^1.5.2",
+    "mocha": "^3.5.3",
+    "normalize.css": "^5.0.0",
+    "opn": "^4.0.2",
+    "optimize-css-assets-webpack-plugin": "^1.3.0",
+    "ora": "^0.3.0",
+    "particles.js": "^2.0.0",
+    "script-loader": "^0.7.2",
+    "selenium-server": "2.53.1",
+    "semver": "^5.3.0",
+    "shelljs": "^0.7.4",
+    "sinon": "^2.1.0",
+    "sinon-chai": "^2.14.0",
+    "url-loader": "^0.5.8",
+    "vue": "^2.5.13",
+    "vue-loader": "^14.1.1",
+    "vue-markdown-loader": "^0.6.0",
+    "vue-style-loader": "^2.0.0",
+    "vue-template-compiler": "^2.5.13",
+    "webpack": "^3.10.0",
+    "webpack-bundle-analyzer": "^2.2.1",
+    "webpack-dashboard": "^0.2.1",
+    "webpack-dev-middleware": "^1.10.0",
+    "webpack-hot-middleware": "^2.20.0",
+    "webpack-merge": "^2.6.1"
+  },
+  "directories": {
+    "doc": "docs"
+  },
+  "engines": {
+    "core-js": "^2.5.0",
+    "node": ">= 4.0.0",
+    "npm": ">= 3.0.0"
+  },
+  "files": [
+    "dist",
+    "src"
+  ],
+  "homepage": "https://github.com/ElemeFE/vue-amap#readme",
+  "license": "MIT",
+  "main": "./dist/index.js",
+  "name": "vue-amap",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/ElemeFE/vue-amap.git"
+  },
+  "scripts": {
+    "build": "node build/build.js",
+    "dev": "node build/dev-server.js --content-base dist/",
+    "lib": "npm run test && export LIB_ENV=lib && node build/lib.js",
+    "lint": "eslint src",
+    "prepublishOnly": "npm run lib",
+    "start": "node build/dev-server.js",
+    "test": "npm run lint && npm run test:unit",
+    "test:dev": "karma  start test/unit/karma.conf.js --single-run=false",
+    "test:unit": "karma  start test/unit/karma.conf.js --single-run"
+  },
+  "sideEffects": false,
+  "version": "0.5.10"
+}

+ 0 - 0
node_modules/vue-amap/src/docs/.nojekyll


+ 25 - 0
node_modules/vue-amap/src/docs/README.md

@@ -0,0 +1,25 @@
+# vue-amap
+[![Build Status](https://travis-ci.org/ElemeFE/vue-amap.svg?branch=master)](https://travis-ci.org/ElemeFE/vue-amap)
+[![npm package](https://img.shields.io/npm/v/vue-amap.svg)](https://www.npmjs.org/package/vue-amap)
+[![NPM downloads](http://img.shields.io/npm/dm/vue-amap.svg)](https://npmjs.org/package/vue-amap)
+![JS gzip size](http://img.badgesize.io/https://unpkg.com/vue-amap/src/lib/index.js?compression=gzip&label=gzip%20size:%20JS)
+[![license](https://img.shields.io/github/license/elemefe/vue-amap.svg?style=flat-square)](https://github.com/ElemeFE/vue-amap)
+[![GitHub stars](https://img.shields.io/github/stars/elemefe/vue-amap.svg?style=social&label=Star)](https://github.com/ElemeFE/vue-amap)
+
+> vue-amap是一套基于Vue 2.0和高德地图的地图组件。
+
+## npm
+
+推荐 npm 安装。
+
+```
+npm install vue-amap --save
+```
+
+## CDN
+
+目前可通过 [unpkg.com/vue-amap](https://unpkg.com/vue-amap/dist/index.js) 获取最新版本的资源。
+
+```html
+<script src="https://unpkg.com/vue-amap/dist/index.js"></script>
+```

+ 13 - 0
node_modules/vue-amap/src/docs/_coverpage.md

@@ -0,0 +1,13 @@
+<!-- _coverpage.md -->
+
+![logo](/assets/images/logo.png)
+
+## vue-amap  |  基于 Vue 2.x 与高德的地图组件
+
+- 数据状态与地图状态单向绑定
+- 开发者无需关心地图的具体操作
+
+[GitHub](https://github.com/ElemeFE/vue-amap/)
+[文档](/zh-cn/introduction/install)
+
+![color](#e4fff7)

+ 50 - 0
node_modules/vue-amap/src/docs/_sidebar.md

@@ -0,0 +1,50 @@
+- 基础
+ - [安装](zh-cn/introduction/install)
+ - [快速上手](zh-cn/introduction/quick-start)
+ - [脚本初始化](zh-cn/introduction/init)
+ - [兼容高德原生 SDK](zh-cn/introduction/compatible)
+ - [引入官方 UI 组件库](zh-cn/introduction/ui-component)
+- 基础
+ - [地图](zh-cn/base/amap)
+
+- 遮盖物
+ - [点坐标](zh-cn/coverings/marker)
+ - [图片覆盖物](zh-cn/coverings/ground-image)
+ - [圆](zh-cn/coverings/circle)
+ - [多边形](zh-cn/coverings/polygon)
+ - [折线](zh-cn/coverings/polyline)
+ - [文本](zh-cn/coverings/text)
+ - [贝塞尔曲线](zh-cn/coverings/bezier-curve)
+ - [圆点标记](zh-cn/coverings/circle-marker)
+ - [椭圆](zh-cn/coverings/ellipse)
+ - [矩形](zh-cn/coverings/rectangle)
+- 窗体
+  - [信息窗体](zh-cn/windows/info-window)
+
+- 扩展
+  - [搜索组件](zh-cn/services/searchbox.md)
+
+- 插件
+  - [指南](zh-cn/plugins/base.md)
+  - [类型插件](zh-cn/plugins/maptype.md)
+  - [鹰眼插件](zh-cn/plugins/overview.md)
+  - [比例尺插件](zh-cn/plugins/scale.md)
+  - [工具条插件](zh-cn/plugins/toolbar.md)
+  - [定位插件](zh-cn/plugins/geolocation.md)
+
+- 自定义组件
+  - [指南](zh-cn/custom/custom.md)
+  - [组件列表](zh-cn/custom/list.md)
+  
+- 示例中心
+ - 基础
+   - [地图](zh-cn/examples/base/amap.md)
+ - 覆盖物
+   - [点坐标 - 聚合](zh-cn/examples/coverings/marker-cluster.md)
+   - [点坐标 - 自定义内容](zh-cn/examples/coverings/marker-custom-content.md)
+   
+ - 窗体
+   - [信息窗体 - 切换](zh-cn/examples/windows/info-window.md)
+   - [信息窗体 - 自定义内容](zh-cn/examples/windows/info-window-custom-content.md)
+
+- [FAQ](zh-cn/faq.md)

BIN
node_modules/vue-amap/src/docs/assets/images/logo.ico


BIN
node_modules/vue-amap/src/docs/assets/images/logo.png


+ 102 - 0
node_modules/vue-amap/src/docs/index.html

@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>组件 | vue-amap</title>
+  <meta name="description" content="Description">
+  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+
+  <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
+  <link rel="stylesheet" href="//unpkg.com/vuep/dist/vuep.css">
+
+  <script src="//unpkg.com/vue@2.5.3/dist/vue.min.js"></script>
+  <script src="//unpkg.com/vuep/dist/vuep.min.js"></script>
+</head>
+<body>
+  <div id="app"></div>
+</body>
+<script>
+  window.$docsify = {
+    loadSidebar: true,
+    coverpage: true,
+    auto2top: true,
+    alias: {
+      '/zh-cn/.*/_sidebar.md': '/_sidebar.md'
+    }
+  }
+</script>
+
+<style>
+  .vuep {
+    flex-direction: column;
+    clear: both;
+    overflow: hidden;
+    box-shadow: 0 0 13px #a0a0a0;
+    height: auto;
+    margin: 30px 0;
+  }
+
+  .vuep-editor {
+    height: 300px;
+  }
+
+  .vuep-editor,
+  .vuep-preview {
+    width: auto;
+    overflow: visible;
+    margin-right: 0;
+  }
+
+  .vuep-preview {
+    padding: 0;
+  }
+
+  .amap-demo {
+    height: 300px;
+  }
+
+  .toolbar {
+    padding: 10px;
+  }
+
+  .toolbar button{
+    background: #42b983;
+    border: 0;
+    color: white;
+    padding: 8px;
+    margin: 0 5px;
+    border-radius: 3px;
+    cursor: pointer;
+  }
+
+  .search-box {
+    position: absolute;
+    top: 15px;
+    left: 20px;
+  }
+
+  .amap-page-container {
+    position: relative;
+  }
+</style>
+
+<script type="text/javascript">
+  window.VueAMap.initAMapApiLoader({
+    key: '160cab8ad6c50752175d76e61ef92c50',
+    plugin: ['Autocomplete', 'PlaceSearch', 'Scale', 'OverView', 'ToolBar', 'MapType', 'PolyEditor', 'AMap.CircleEditor', 'Geolocation', 'Geocoder', 'MarkerClusterer', 'ElasticMarker'],
+    uiVersion: '1.0',
+    v: '1.4.6'
+  });
+</script>
+
+<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-101628170-1', 'auto');
+ga('send', 'pageview');
+</script>
+</html>

BIN
node_modules/vue-amap/src/docs/logo.ico


+ 37 - 0
node_modules/vue-amap/src/docs/zh-cn/_sidebar.md

@@ -0,0 +1,37 @@
+- 基础
+ - [安装](zh-cn/introduction/install)
+ - [快速上手](zh-cn/introduction/quick-start)
+ - [脚本初始化](zh-cn/introduction/init)
+ - [兼容高德原生 SDK](zh-cn/introduction/compatible)
+ - [引入官方 UI 组件库](zh-cn/introduction/ui-component)
+- 基础
+ - [地图](zh-cn/base/amap)
+
+- 遮盖物
+ - [点坐标](zh-cn/coverings/marker)
+ - [图片覆盖物](zh-cn/coverings/ground-image)
+ - [圆](zh-cn/coverings/circle)
+ - [多边形](zh-cn/coverings/polygon)
+ - [折线](zh-cn/coverings/polyline)
+
+- 窗体
+  - [信息窗体](zh-cn/windows/info-window)
+
+- 扩展
+  - [搜索组件](zh-cn/services/searchbox.md)
+
+- 插件
+  - [指南](zh-cn/plugins/base.md)
+  - [类型插件](zh-cn/plugins/maptype.md)
+  - [鹰眼插件](zh-cn/plugins/overview.md)
+  - [比例尺插件](zh-cn/plugins/scale.md)
+  - [工具条插件](zh-cn/plugins/toolbar.md)
+  - [定位插件](zh-cn/plugins/geolocation.md)
+
+- 示例中心
+ - 基础
+   - [地图](zh-cn/examples/base/amap.md)
+ - 覆盖物
+   - [点坐标 - 聚合](zh-cn/examples/coverings/marker-cluster.md)
+ - 窗体
+   - [信息窗体](zh-cn/examples/windows/info-window.md)

+ 161 - 0
node_modules/vue-amap/src/docs/zh-cn/base/amap.md

@@ -0,0 +1,161 @@
+# 地图
+
+地图组件
+
+## 基础示例
+
+<vuep template="#example"></vuep>
+
+<script v-pre type="text/x-template" id="example">
+
+  <template>
+    <div class="amap-page-container">
+      <el-amap ref="map" vid="amapDemo" :amap-manager="amapManager" :center="center" :zoom="zoom" :plugin="plugin" :events="events" class="amap-demo">
+      </el-amap>
+
+      <div class="toolbar">
+        <button @click="getMap()">get map</button>
+      </div>
+    </div>
+  </template>
+
+  <style>
+    .amap-demo {
+      height: 300px;
+    }
+  </style>
+
+  <script>
+    // NPM 方式
+    // import { AMapManager } from 'vue-amap';
+    // CDN 方式
+    let amapManager = new VueAMap.AMapManager();
+    module.exports = {
+      data: function() {
+        return {
+          amapManager,
+          zoom: 12,
+          center: [121.59996, 31.197646],
+          events: {
+            init: (o) => {
+              console.log(o.getCenter())
+              console.log(this.$refs.map.$$getInstance())
+              o.getCity(result => {
+                console.log(result)
+              })
+            },
+            'moveend': () => {
+            },
+            'zoomchange': () => {
+            },
+            'click': (e) => {
+              alert('map clicked');
+            }
+          },
+          plugin: ['ToolBar', {
+            pName: 'MapType',
+            defaultType: 0,
+            events: {
+              init(o) {
+                console.log(o);
+              }
+            }
+          }]
+        };
+      },
+
+      methods: {
+        getMap() {
+          // amap vue component
+          console.log(amapManager._componentMap);
+          // gaode map instance
+          console.log(amapManager._map);
+        }
+      }
+    };
+  </script>
+
+</script>
+
+## 静态属性
+仅且可以初始化配置,不支持响应式。
+
+名称 | 类型 | 说明
+---|---|---|
+vid | String | 地图容器节点的ID。
+amapManager| AMapManager | 地图管理对象。
+defaultCursor | String | 地图默认鼠标样式。参数defaultCursor应符合CSS的cursor属性规范。
+animateEnable | Boolean | 地图平移过程中是否使用动画,默认为true,即使用动画。
+isHotspot | Boolean | 是否开启地图热点,默认false 不打开。
+rotateEnable | Boolean  | 地图是否可旋转,默认false。
+resizeEnable | Boolean  | 是否监控地图容器尺寸变化,默认值为false。
+showIndoorMap | Boolean  | 	是否在有矢量底图的时候自动展示室内地图,PC端默认是true,移动端默认是false。
+expandZoomRange | Boolean | 	是否支持可以扩展最大缩放级别.设置为true的时候,zooms的最大级别在PC上可以扩大到20级,移动端还是高清19/非高清20。
+dragEnable | Boolean  | 	地图是否可通过鼠标拖拽平移,默认为true。
+zoomEnable | Boolean  | 	地图是否可缩放,默认值为true。
+doubleClickZoom | Boolean  | 	地图是否可通过双击鼠标放大地图,默认为true。
+keyboardEnable | Boolean  | 	地图是否可通过键盘控制,方向键控制地图平移,"+"和"-"可以控制地图的缩放,Ctrl+“→”顺时针旋转,Ctrl+“←”逆时针旋转,默认为true。
+jogEnable | Boolean  | 	地图是否使用缓动效果,默认值为true。
+scrollWheel | Boolean  | 	地图是否可通过鼠标滚轮缩放浏览,默认为true。
+touchZoom | Boolean  | 	地图在移动终端上是否可通过多点触控缩放浏览地图,默认为true。
+
+## 动态属性
+
+支持响应式。
+
+名称 | 类型 | 说明
+---|---|---|
+zooms | Array | 地图显示的缩放级别范围,在PC上,默认范围[3,18],取值范围[3-18];在移动设备上,默认范围[3-19],取值范围[3-19]
+center | Array | 地图中心点坐标值
+labelzIndex | Number | 地图标注显示顺序
+lang | String | 地图语言类型 默认:zh_cn,可选值:zh_cn:中文简体,en:英文,zh_en:中英文对照
+mapStyle	| String |	设置地图显示样式,目前支持normal(默认样式)、dark(深色样式)、light(浅色样式)、fresh(osm清新风格样式)四种
+
+## AmapManager
+
+用于获取地图实例,以及获得地图内组件的实例。
+
+名称 | 参数 | 返回类型 | 说明
+---|--- | --- |---|
+getMap | | AMap.Map | 返回地图实例,注入该管理实例的组件的地图实例
+getChildInstance| vid | instance | 返回 vid 对应的组件实例
+
+## ref 可用方法
+提供无副作用的同步帮助方法
+
+函数 | 返回 | 说明
+---|---|---|
+$$getInstance() | [AMap.Map](http://lbs.amap.com/api/javascript-api/reference/map) | 获取地图实例
+$$getCenter()   | [lng: Number, lat: Number] | 获取地图中心
+
+
+## 事件
+
+事件 | 参数 | 说明
+---|---|---|
+complete | |地图图块加载完成后触发事件
+click |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标左键单击事件 相关示例
+dblclick |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标左键双击事件
+mapmove | |地图平移时触发事件
+hotspotclick |{type,lnglat,name,id} |鼠标点击热点时触发(自v1.3 新增)
+hotspotover |{type,lnglat,name,id} |鼠标滑过热点时触发(自v1.3 新增)
+hotspotout |{type,lnglat,name,id} |鼠标移出热点时触发(自v1.3 新增)
+movestart | |地图平移开始时触发
+moveend | |地图平移结束后触发。如地图有拖拽缓动效果,则在缓动结束后触发
+zoomchange | |地图缩放级别更改后触发
+zoomstart | |缩放开始时触发
+zoomend | |缩放停止时触发
+mousemove |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标在地图上移动时触发
+mousewheel |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标滚轮开始缩放地图时触发
+mouseover |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标移入地图容器内时触发
+mouseout |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标移出地图容器时触发
+mouseup |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标在地图上单击抬起时触发
+mousedown |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标在地图上单击按下时触发
+rightclick |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |鼠标右键单击事件
+dragstart | |开始拖拽地图时触发
+dragging | |拖拽地图过程中触发
+dragend | |停止拖拽地图时触发。如地图有拖拽缓动效果,则在拽停止,缓动开始前触发
+resize | |地图容器大小改变事件
+touchstart |[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent) |触摸开始时触发事件,仅适用移动设备
+touchmove	|[MapsEvent](http://lbs.amap.com/api/javascript-api/reference/event/#MapsEvent)	|触摸移动进行中时触发事件,仅适用移动设备
+touchend | |

Some files were not shown because too many files changed in this diff