ranuts 0.1.0-alpha.3 → 0.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -842,7 +842,13 @@ function querystring(data = {}) {
842
842
  if (typeof data !== "object") {
843
843
  throw new TypeError("param must be object");
844
844
  }
845
- return Object.entries(data).reduce((searchParams, [name, value]) => value === void 0 || value == null ? searchParams : (searchParams.append(decodeURIComponent(name), decodeURIComponent(value)), searchParams), new URLSearchParams()).toString();
845
+ return Object.entries(data).reduce(
846
+ (searchParams, [name, value]) => value === void 0 || value == null ? searchParams : (searchParams.append(
847
+ decodeURIComponent(name),
848
+ decodeURIComponent(value)
849
+ ), searchParams),
850
+ new URLSearchParams()
851
+ ).toString();
846
852
  }
847
853
  function randomString(len = 8) {
848
854
  const chars = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678";
@@ -854,25 +860,48 @@ function randomString(len = 8) {
854
860
  return `${Date.now()}-${pwd}`;
855
861
  }
856
862
  function getCookie(name) {
857
- const cookieList = window.document.cookie.match(
858
- new RegExp(`(^| )${name}(?:=([^;]*))?(;|$)`)
859
- );
860
- if (cookieList && cookieList[2])
861
- return cookieList[2];
863
+ if (typeof window !== "undefined") {
864
+ const cookieList = document.cookie.match(
865
+ new RegExp(`(^| )${name}(?:=([^;]*))?(;|$)`)
866
+ );
867
+ if (cookieList && cookieList[2])
868
+ return cookieList[2];
869
+ }
862
870
  return "";
863
871
  }
872
+ const getWindow = () => {
873
+ if (typeof window.innerWidth !== "undefined") {
874
+ return {
875
+ width: window.innerWidth,
876
+ height: window.innerHeight
877
+ };
878
+ }
879
+ return {
880
+ width: 0,
881
+ height: 0
882
+ };
883
+ };
864
884
  function createData(params = {}) {
865
- return Object.assign({}, {
866
- id: randomString(),
867
- path: window.location.href,
868
- time: Date.now(),
869
- userAgent: window.navigator.userAgent,
870
- referrer: document.referrer,
871
- ip: window.returnCitySN || { cid: "", cip: "", cname: "" },
872
- userId: getCookie("chaxus_prod")
873
- }, params);
885
+ if (typeof window !== "undefined") {
886
+ const { width, height } = getWindow();
887
+ return Object.assign(
888
+ {},
889
+ {
890
+ id: randomString(),
891
+ path: window.location.href,
892
+ time: Date.now(),
893
+ userAgent: window.navigator.userAgent,
894
+ referrer: document.referrer,
895
+ ip: window.returnCitySN || { cid: "", cip: "", cname: "" },
896
+ userId: getCookie("chaxus_prod"),
897
+ ratio: `${width}x${height}`
898
+ },
899
+ params
900
+ );
901
+ }
902
+ return {};
874
903
  }
875
- const throttle = (fn, wait = 300) => {
904
+ const throttle = (fn, wait = 500) => {
876
905
  let timer = null;
877
906
  return function(...args) {
878
907
  const context = this;
@@ -901,102 +930,114 @@ const isString = (obj) => {
901
930
  return toString.call(obj) === "[object String]";
902
931
  };
903
932
  const handleClick = (hooks = Noop) => {
904
- document.addEventListener("click", function(event) {
905
- hooks(event);
906
- }, true);
933
+ if (typeof document !== "undefined") {
934
+ document.addEventListener(
935
+ "click",
936
+ function(event) {
937
+ hooks(event);
938
+ },
939
+ true
940
+ );
941
+ }
907
942
  };
908
943
  const handleError = (hooks = Noop) => {
909
- window.addEventListener("unhandledrejection", (error) => {
910
- hooks(error);
911
- }, true);
912
- window.addEventListener("error", (error) => {
913
- hooks(error);
914
- return false;
915
- }, true);
944
+ if (typeof window !== "undefined") {
945
+ window.addEventListener("unhandledrejection", (error) => {
946
+ hooks(error);
947
+ }, true);
948
+ window.addEventListener("error", (error) => {
949
+ hooks(error);
950
+ return false;
951
+ }, true);
952
+ }
916
953
  };
917
954
  function getPerformance() {
918
- const [performanceNavigationTiming] = performance.getEntriesByType("navigation");
919
- const [firstPaint, firstContentfulPaint] = performance.getEntriesByType("paint");
920
- const {
921
- domainLookupEnd,
922
- domainLookupStart,
923
- connectEnd,
924
- connectStart,
925
- secureConnectionStart,
926
- loadEventStart,
927
- domInteractive,
928
- domContentLoadedEventEnd,
929
- duration,
930
- responseStart,
931
- requestStart,
932
- responseEnd,
933
- fetchStart,
934
- transferSize,
935
- encodedBodySize,
936
- redirectEnd,
937
- redirectStart,
938
- redirectCount
939
- } = performanceNavigationTiming;
940
- const { startTime: fp } = firstPaint;
941
- const { startTime: fcp } = firstContentfulPaint;
942
- return {
943
- dnsSearch: domainLookupEnd - domainLookupStart,
944
- tcpConnect: connectEnd - connectStart,
945
- sslConnect: connectEnd - secureConnectionStart,
946
- request: responseStart - requestStart,
947
- response: responseEnd - responseStart,
948
- parseDomTree: domInteractive - responseEnd,
949
- resource: loadEventStart - domContentLoadedEventEnd,
950
- domReady: domContentLoadedEventEnd - fetchStart,
951
- interactive: domInteractive - fetchStart,
952
- complete: loadEventStart - fetchStart,
953
- httpHead: transferSize - encodedBodySize,
954
- redirect: redirectCount,
955
- redirectTime: redirectEnd - redirectStart,
956
- duration,
957
- fp,
958
- fcp
959
- };
955
+ if (typeof window !== "undefined") {
956
+ const [performanceNavigationTiming] = performance.getEntriesByType("navigation");
957
+ const [firstPaint = {}, firstContentfulPaint = {}] = performance.getEntriesByType("paint");
958
+ const { startTime: fp } = firstPaint;
959
+ const { startTime: fcp } = firstContentfulPaint;
960
+ const {
961
+ domainLookupEnd,
962
+ domainLookupStart,
963
+ connectEnd,
964
+ connectStart,
965
+ secureConnectionStart,
966
+ loadEventStart,
967
+ domInteractive,
968
+ domContentLoadedEventEnd,
969
+ duration,
970
+ responseStart,
971
+ requestStart,
972
+ responseEnd,
973
+ fetchStart,
974
+ transferSize,
975
+ encodedBodySize,
976
+ redirectEnd,
977
+ redirectStart,
978
+ redirectCount
979
+ } = performanceNavigationTiming;
980
+ return {
981
+ dnsSearch: domainLookupEnd - domainLookupStart,
982
+ tcpConnect: connectEnd - connectStart,
983
+ sslConnect: connectEnd - secureConnectionStart,
984
+ request: responseStart - requestStart,
985
+ response: responseEnd - responseStart,
986
+ parseDomTree: domInteractive - responseEnd,
987
+ resource: loadEventStart - domContentLoadedEventEnd,
988
+ domReady: domContentLoadedEventEnd - fetchStart,
989
+ interactive: domInteractive - fetchStart,
990
+ complete: loadEventStart - fetchStart,
991
+ httpHead: transferSize - encodedBodySize,
992
+ redirect: redirectCount,
993
+ redirectTime: redirectEnd - redirectStart,
994
+ duration,
995
+ fp,
996
+ fcp
997
+ };
998
+ }
960
999
  }
961
1000
  const getHost = (env) => {
962
- let host = "";
963
- if (env && isString(env)) {
964
- if (/trunk|neibu|release/.test(env)) {
965
- host = `.${env}`;
966
- } else if (/test/.test(env)) {
967
- host = env;
968
- } else if (/prod/.test(env)) {
969
- host = "";
1001
+ if (typeof window !== "undefined") {
1002
+ if (env && isString(env)) {
1003
+ if (/trunk|neibu|release/.test(env))
1004
+ ;
1005
+ else if (/test/.test(env))
1006
+ ;
1007
+ else if (/prod/.test(env))
1008
+ ;
1009
+ else
1010
+ ;
970
1011
  } else {
971
- host = "";
972
- }
973
- } else {
974
- const env2 = /\w(\.trunk|\.neibu|\.release|test)\./.exec(
975
- window.location.hostname
976
- );
977
- if (env2) {
978
- host = env2[1];
1012
+ const env2 = /\w(\.trunk|\.neibu|\.release|test)\./.exec(
1013
+ window.location.hostname
1014
+ );
1015
+ if (env2) {
1016
+ env2[1];
1017
+ }
979
1018
  }
1019
+ return "//log.chaxus.com";
980
1020
  }
981
- return host ? `https://log${host}.chaxus.com` : "https://log.chaxus.com";
982
1021
  };
983
1022
  const sendBeacon = ({ url = "", type = "application/json; charset=UTF-8", payload = {} }) => {
984
1023
  const requestUrl = url ? url : getHost();
985
- if (navigator.sendBeacon) {
1024
+ if (navigator.sendBeacon && requestUrl) {
986
1025
  const param = new Blob([JSON.stringify(payload)], { type });
987
1026
  return navigator.sendBeacon(requestUrl, param);
988
1027
  }
989
1028
  };
990
1029
  const sendImage = ({ url = "", payload = {} }) => {
991
1030
  const requestUrl = url ? url : getHost();
992
- const image = new Image();
993
- image.width = 1;
994
- image.height = 1;
995
- image.src = `${requestUrl}?${querystring(payload)}`;
1031
+ if (typeof document !== "undefined" && requestUrl) {
1032
+ const image = new Image();
1033
+ image.width = 1;
1034
+ image.height = 1;
1035
+ image.src = `${requestUrl}?${querystring(payload)}`;
1036
+ }
996
1037
  };
997
1038
  const report = ({ url = "", type = "application/json; charset=UTF-8", payload = {} }) => {
998
1039
  const requestUrl = url ? url : getHost();
999
- if (typeof navigator.sendBeacon !== "undefined") {
1040
+ if (typeof navigator !== "undefined") {
1000
1041
  return sendBeacon({ url: requestUrl, type, payload });
1001
1042
  }
1002
1043
  return sendImage({ url: requestUrl, payload });
@@ -1020,29 +1061,55 @@ const handleFetchHook = (options = {}) => {
1020
1061
  }
1021
1062
  };
1022
1063
  const handleXhrHook = (options = {}) => {
1023
- const originalXhrProto = XMLHttpRequest.prototype;
1024
- const { requestHook = Noop, responseHook = Noop, errorHook = Noop } = options;
1025
- const replacementXhrOpen = (originalOpen) => {
1026
- return function(...args) {
1027
- requestHook(args);
1028
- originalOpen.apply(this, args);
1064
+ if (typeof window !== "undefined") {
1065
+ const originalXhrProto = XMLHttpRequest.prototype;
1066
+ const { requestHook = Noop, responseHook = Noop, errorHook = Noop } = options;
1067
+ const replacementXhrOpen = (originalOpen) => {
1068
+ return function(...args) {
1069
+ requestHook(args);
1070
+ originalOpen.apply(this, args);
1071
+ };
1029
1072
  };
1030
- };
1031
- replaceOld(originalXhrProto, "open", replacementXhrOpen);
1032
- const replacementXhrSend = (originalSend) => {
1033
- return function(...args) {
1034
- this.addEventListener("loadend", function() {
1035
- responseHook(this);
1036
- });
1037
- this.addEventListener("error", function() {
1038
- errorHook(this);
1039
- });
1040
- originalSend.apply(this, args);
1073
+ replaceOld(originalXhrProto, "open", replacementXhrOpen);
1074
+ const replacementXhrSend = (originalSend) => {
1075
+ return function(...args) {
1076
+ this.addEventListener("loadend", function() {
1077
+ responseHook(this);
1078
+ });
1079
+ this.addEventListener("error", function() {
1080
+ errorHook(this);
1081
+ });
1082
+ originalSend.apply(this, args);
1083
+ };
1041
1084
  };
1042
- };
1043
- replaceOld(originalXhrProto, "send", replacementXhrSend);
1085
+ replaceOld(originalXhrProto, "send", replacementXhrSend);
1086
+ }
1087
+ };
1088
+ const handleConsole = (hooks = Noop) => {
1089
+ const consoleTypeList = ["log", "info", "warn", "error", "assert"];
1090
+ consoleTypeList.forEach((type) => {
1091
+ const replacement = (originalConsole) => {
1092
+ return function(...args) {
1093
+ if (originalConsole) {
1094
+ hooks(type, ...args);
1095
+ originalConsole.apply(console, args);
1096
+ }
1097
+ };
1098
+ };
1099
+ replaceOld(console, type, replacement);
1100
+ });
1044
1101
  };
1045
1102
  class Monitor {
1103
+ constructor() {
1104
+ __publicField(this, "init", () => {
1105
+ this.reportClick();
1106
+ this.reportError();
1107
+ this.reportFetch();
1108
+ this.reportPerformance();
1109
+ this.reportXhr();
1110
+ });
1111
+ this.initialize();
1112
+ }
1046
1113
  reportPerformance() {
1047
1114
  const params = getPerformance();
1048
1115
  const payload = createData();
@@ -1060,7 +1127,14 @@ class Monitor {
1060
1127
  const throttleReport = throttle(report);
1061
1128
  const payload = createData();
1062
1129
  const hook = (event) => {
1063
- throttleReport({ payload: { ...payload, event, type: "click" } });
1130
+ const { pageX, pageY, screenX, screenY, type } = event;
1131
+ throttleReport({
1132
+ payload: {
1133
+ ...payload,
1134
+ data: { pageX, pageY, screenX, screenY, type },
1135
+ type: "click"
1136
+ }
1137
+ });
1064
1138
  };
1065
1139
  handleClick(hook);
1066
1140
  }
@@ -1068,13 +1142,19 @@ class Monitor {
1068
1142
  const throttleReport = throttle(report);
1069
1143
  const payload = createData();
1070
1144
  const requestHook = (...args) => {
1071
- throttleReport({ payload: { ...payload, ...args, type: "xhrRequest" } });
1145
+ throttleReport({
1146
+ payload: { ...payload, data: { ...args }, type: "xhrRequest" }
1147
+ });
1072
1148
  };
1073
1149
  const responseHook = (...args) => {
1074
- throttleReport({ payload: { ...payload, ...args, type: "xhrResponse" } });
1150
+ throttleReport({
1151
+ payload: { ...payload, data: { ...args }, type: "xhrResponse" }
1152
+ });
1075
1153
  };
1076
1154
  const errorHook = (...args) => {
1077
- throttleReport({ payload: { ...payload, ...args, type: "xhrError" } });
1155
+ throttleReport({
1156
+ payload: { ...payload, data: { ...args }, type: "xhrError" }
1157
+ });
1078
1158
  };
1079
1159
  handleXhrHook({ requestHook, responseHook, errorHook });
1080
1160
  }
@@ -1082,13 +1162,19 @@ class Monitor {
1082
1162
  const throttleReport = throttle(report);
1083
1163
  const payload = createData();
1084
1164
  const requestHook = (...args) => {
1085
- throttleReport({ payload: { ...payload, ...args, type: "fetchRequest" } });
1165
+ throttleReport({
1166
+ payload: { ...payload, data: { ...args }, type: "fetchRequest" }
1167
+ });
1086
1168
  };
1087
1169
  const responseHook = (...args) => {
1088
- throttleReport({ payload: { ...payload, ...args, type: "fetchResponse" } });
1170
+ throttleReport({
1171
+ payload: { ...payload, data: { ...args }, type: "fetchResponse" }
1172
+ });
1089
1173
  };
1090
1174
  const errorHook = (...args) => {
1091
- throttleReport({ payload: { ...payload, ...args, type: "fetchError" } });
1175
+ throttleReport({
1176
+ payload: { ...payload, data: { ...args }, type: "fetchError" }
1177
+ });
1092
1178
  };
1093
1179
  handleFetchHook({ requestHook, responseHook, errorHook });
1094
1180
  }
@@ -1096,10 +1182,885 @@ class Monitor {
1096
1182
  const throttleReport = throttle(report);
1097
1183
  const payload = createData();
1098
1184
  const hook = (...args) => {
1099
- throttleReport({ payload: { ...payload, ...args, type: "error" } });
1185
+ throttleReport({
1186
+ payload: { ...payload, data: { ...args }, type: "error" }
1187
+ });
1100
1188
  };
1101
1189
  handleError(hook);
1102
1190
  }
1191
+ reportConsole() {
1192
+ const throttleReport = throttle(report);
1193
+ const payload = createData();
1194
+ const hook = (...args) => {
1195
+ throttleReport({
1196
+ payload: { ...payload, data: { ...args }, type: "console" }
1197
+ });
1198
+ };
1199
+ handleConsole(hook);
1200
+ }
1201
+ initialize() {
1202
+ if (typeof window !== "undefined" && !window.ranlog) {
1203
+ window.ranlog = true;
1204
+ this.init();
1205
+ }
1206
+ if (typeof process !== "undefined" && !process.ranlog) {
1207
+ process.ranlog = true;
1208
+ this.init();
1209
+ }
1210
+ }
1211
+ }
1212
+ const MimeType = /* @__PURE__ */ new Map([
1213
+ [".ez", "application/andrew-inset"],
1214
+ [".aw", "application/applixware"],
1215
+ [".txt", "text/plain"],
1216
+ [".ez", "application/andrew-inset"],
1217
+ [".aw", "application/applixware"],
1218
+ [".atom", "application/atom+xml"],
1219
+ [".atomcat", "application/atomcat+xml"],
1220
+ [".atomsvc", "application/atomsvc+xml"],
1221
+ [".ccxml", "application/ccxml+xml"],
1222
+ [".cu", "application/cu-seeme"],
1223
+ [".davmount", "application/davmount+xml"],
1224
+ [".ecma", "application/ecmascript"],
1225
+ [".emma", "application/emma+xml"],
1226
+ [".epub", "application/epub+zip"],
1227
+ [".pfr", "application/font-tdpfr"],
1228
+ [".stk", "application/hyperstudio"],
1229
+ [".jar", "application/java-archive"],
1230
+ [".ser", "application/java-serialized-object"],
1231
+ [".class", "application/java-vm"],
1232
+ [".js", "application/javascript"],
1233
+ [".ts", "application/javascript"],
1234
+ [".json", "application/json"],
1235
+ [".lostxml", "application/lost+xml"],
1236
+ [".hqx", "application/mac-binhex40"],
1237
+ [".cpt", "application/mac-compactpro"],
1238
+ [".mrc", "application/marc"],
1239
+ [".ma,", "application/mathematica"],
1240
+ [".nb", "application/mathematica"],
1241
+ [".mb", "application/mathematica"],
1242
+ [".mathml", "application/mathml+xml"],
1243
+ [".mbox", "application/mbox"],
1244
+ [".mscml", "application/mediaservercontrol+xml"],
1245
+ [".mp4s", "application/mp4"],
1246
+ [".doc", "application/msword"],
1247
+ [".dot", "application/msword"],
1248
+ [".mxf", "application/mxf"],
1249
+ [".oda", "application/oda"],
1250
+ [".opf", "application/oebps-package+xml"],
1251
+ [".ogx", "application/ogg"],
1252
+ [".onetoc", "application/onenote"],
1253
+ [".onetoc2", "application/onenote"],
1254
+ [".onetmp", "application/onenote"],
1255
+ [".onepkg", "application/onenote"],
1256
+ [".xer", "application/patch-ops-error+xml"],
1257
+ [".pdf", "application/pdf"],
1258
+ [".pgp", "application/pgp-encrypted"],
1259
+ [".asc", "application/pgp-signature"],
1260
+ [".sig", "application/pgp-signature"],
1261
+ [".prf", "application/pics-rules"],
1262
+ [".p10", "application/pkcs10"],
1263
+ [".p7c", "application/pkcs7-mime"],
1264
+ [".p7m", "application/pkcs7-mime"],
1265
+ [".p7s", "application/pkcs7-signature"],
1266
+ [".cer", "application/pkix-cert"],
1267
+ [".crl", "application/pkix-crl"],
1268
+ [".pkipath", "application/pkix-pkipath"],
1269
+ [".pki", "application/pkixcmp"],
1270
+ [".pls", "application/pls+xml"],
1271
+ [".ai", "application/postscript"],
1272
+ [".eps", "application/postscript"],
1273
+ [".ps", "application/postscript"],
1274
+ [".cww", "application/prs.cww"],
1275
+ [".rdf", "application/rdf+xml"],
1276
+ [".rif", "application/reginfo+xml"],
1277
+ [".rnc", "application/relax-ng-compact-syntax"],
1278
+ [".rl", "application/resource-lists+xml"],
1279
+ [".rld", "application/resource-lists-diff+xml"],
1280
+ [".rs", "application/rls-services+xml"],
1281
+ [".rsd", "application/rsd+xml"],
1282
+ [".rss", "application/rss+xml"],
1283
+ [".rtf", "application/rtf"],
1284
+ [".sbml", "application/sbml+xml"],
1285
+ [".scq", "application/scvp-cv-request"],
1286
+ [".scs", "application/scvp-cv-response"],
1287
+ [".spq", "application/scvp-vp-request"],
1288
+ [".spp", "application/scvp-vp-response"],
1289
+ [".sdp", "application/sdp"],
1290
+ [".setpay", "application/set-payment-initiation"],
1291
+ [".setreg", "application/set-registration-initiation"],
1292
+ [".shf", "application/shf+xml"],
1293
+ [".smil", "application/smil+xml"],
1294
+ [".smi", "application/smil+xml"],
1295
+ [".rq", "application/sparql-query"],
1296
+ [".srx", "application/sparql-results+xml"],
1297
+ [".gram", "application/srgs"],
1298
+ [".grxml", "application/srgs+xml"],
1299
+ [".ssml", "application/ssml+xml"],
1300
+ [".plb", "application/vnd.3gpp.pic-bw-large"],
1301
+ [".psb", "application/vnd.3gpp.pic-bw-small"],
1302
+ [".pvb", "application/vnd.3gpp.pic-bw-var"],
1303
+ [".tcap", "application/vnd.3gpp2.tcap"],
1304
+ [".pwn", "application/vnd.3m.post-it-notes"],
1305
+ [".aso", "application/vnd.accpac.simply.aso"],
1306
+ [".imp", "application/vnd.accpac.simply.imp"],
1307
+ [".acu", "application/vnd.acucobol"],
1308
+ [".atc", "application/vnd.acucorp"],
1309
+ [".acutc", "application/vnd.acucorp"],
1310
+ [".air", "application/vnd.adobe.air-application-installer-package+zip"],
1311
+ [".xdp", "application/vnd.adobe.xdp+xml"],
1312
+ [".xfdf", "application/vnd.adobe.xfdf"],
1313
+ [".azf", "application/vnd.airzip.filesecure.azf"],
1314
+ [".azs", "application/vnd.airzip.filesecure.azs"],
1315
+ [".azw", "application/vnd.amazon.ebook"],
1316
+ [".acc", "application/vnd.americandynamics.acc"],
1317
+ [".ami", "application/vnd.amiga.ami"],
1318
+ [".apk", "application/vnd.android.package-archive"],
1319
+ [".cii", "application/vnd.anser-web-certificate-issue-initiation"],
1320
+ [".fti", "application/vnd.anser-web-funds-transfer-initiation"],
1321
+ [".atx", "application/vnd.antix.game-component"],
1322
+ [".mpkg", "application/vnd.apple.installer+xml"],
1323
+ [".swi", "application/vnd.arastra.swi"],
1324
+ [".aep", "application/vnd.audiograph"],
1325
+ [".mpm", "application/vnd.blueice.multipass"],
1326
+ [".bmi", "application/vnd.bmi"],
1327
+ [".rep", "application/vnd.businessobjects"],
1328
+ [".cdxml", "application/vnd.chemdraw+xml"],
1329
+ [".mmd", "application/vnd.chipnuts.karaoke-mmd"],
1330
+ [".cdy", "application/vnd.cinderella"],
1331
+ [".cla", "application/vnd.claymore"],
1332
+ [".c4u", "application/vnd.clonk.c4group"],
1333
+ [".c4p", "application/vnd.clonk.c4group"],
1334
+ [".c4f", "application/vnd.clonk.c4group"],
1335
+ [".c4d", "application/vnd.clonk.c4group"],
1336
+ [".c4g", "application/vnd.clonk.c4group"],
1337
+ [".csp", "application/vnd.commonspace"],
1338
+ [".cdbcmsg", "application/vnd.contact.cmsg"],
1339
+ [".cmc", "application/vnd.cosmocaller"],
1340
+ [".clkx", "application/vnd.crick.clicker"],
1341
+ [".clkk", "application/vnd.crick.clicker.keyboard"],
1342
+ [".clkp", "application/vnd.crick.clicker.palette"],
1343
+ [".clkt", "application/vnd.crick.clicker.template"],
1344
+ [".clkw", "application/vnd.crick.clicker.wordbank"],
1345
+ [".wbs", "application/vnd.criticaltools.wbs+xml"],
1346
+ [".pml", "application/vnd.ctc-posml"],
1347
+ [".ppd", "application/vnd.cups-ppd"],
1348
+ [".car", "application/vnd.curl.car"],
1349
+ [".pcurl", "application/vnd.curl.pcurl"],
1350
+ [".rdz", "application/vnd.data-vision.rdz"],
1351
+ [".fe_launch", "application/vnd.denovo.fcselayout-link"],
1352
+ [".dna", "application/vnd.dna"],
1353
+ [".mlp", "application/vnd.dolby.mlp"],
1354
+ [".dpg", "application/vnd.dpgraph"],
1355
+ [".dfac", "application/vnd.dreamfactory"],
1356
+ [".geo", "application/vnd.dynageo"],
1357
+ [".mag", "application/vnd.ecowin.chart"],
1358
+ [".nml", "application/vnd.enliven"],
1359
+ [".esf", "application/vnd.epson.esf"],
1360
+ [".msf", "application/vnd.epson.msf"],
1361
+ [".qam", "application/vnd.epson.quickanime"],
1362
+ [".slt", "application/vnd.epson.salt"],
1363
+ [".ssf", "application/vnd.epson.ssf"],
1364
+ [".et3", "application/vnd.eszigno3+xml"],
1365
+ [".es3", "application/vnd.eszigno3+xml"],
1366
+ [".ez2", "application/vnd.ezpix-album"],
1367
+ [".ez3", "application/vnd.ezpix-package"],
1368
+ [".fdf", "application/vnd.fdf"],
1369
+ [".mseed", "application/vnd.fdsn.mseed"],
1370
+ [".dataless", "application/vnd.fdsn.seed"],
1371
+ [".seed", "application/vnd.fdsn.seed"],
1372
+ [".gph", "application/vnd.flographit"],
1373
+ [".ftc", "application/vnd.fluxtime.clip"],
1374
+ [".fm", "application/vnd.framemaker"],
1375
+ [".frame", "application/vnd.framemaker"],
1376
+ [".maker", "application/vnd.framemaker"],
1377
+ [".book", "application/vnd.framemaker"],
1378
+ [".fnc", "application/vnd.frogans.fnc"],
1379
+ [".ltf", "application/vnd.frogans.ltf"],
1380
+ [".fsc", "application/vnd.fsc.weblaunch"],
1381
+ [".oas", "application/vnd.fujitsu.oasys"],
1382
+ [".oa2", "application/vnd.fujitsu.oasys2"],
1383
+ [".oa3", "application/vnd.fujitsu.oasys3"],
1384
+ [".fg5", "application/vnd.fujitsu.oasysgp"],
1385
+ [".bh2", "application/vnd.fujitsu.oasysprs"],
1386
+ [".ddd", "application/vnd.fujixerox.ddd"],
1387
+ [".xdw", "application/vnd.fujixerox.docuworks"],
1388
+ [".xbd", "application/vnd.fujixerox.docuworks.binder"],
1389
+ [".fzs", "application/vnd.fuzzysheet"],
1390
+ [".txd", "application/vnd.genomatix.tuxedo"],
1391
+ [".ggb", "application/vnd.geogebra.file"],
1392
+ [".ggt", "application/vnd.geogebra.tool"],
1393
+ [".gre", "application/vnd.geometry-explorer"],
1394
+ [".gex", "application/vnd.geometry-explorer"],
1395
+ [".gmx", "application/vnd.gmx"],
1396
+ [".kml", "application/vnd.google-earth.kml+xml"],
1397
+ [".kmz", "application/vnd.google-earth.kmz"],
1398
+ [".gqf", "application/vnd.grafeq"],
1399
+ [".gqs", "application/vnd.grafeq"],
1400
+ [".gac", "application/vnd.groove-account"],
1401
+ [".ghf", "application/vnd.groove-help"],
1402
+ [".gim", "application/vnd.groove-identity-message"],
1403
+ [".grv", "application/vnd.groove-injector"],
1404
+ [".gtm", "application/vnd.groove-tool-message"],
1405
+ [".tpl", "application/vnd.groove-tool-template"],
1406
+ [".vcg", "application/vnd.groove-vcard"],
1407
+ [".zmm", "application/vnd.handheld-entertainment+xml"],
1408
+ [".hbci", "application/vnd.hbci"],
1409
+ [".les", "application/vnd.hhe.lesson-player"],
1410
+ [".hpgl", "application/vnd.hp-hpgl"],
1411
+ [".hpid", "application/vnd.hp-hpid"],
1412
+ [".hps", "application/vnd.hp-hps"],
1413
+ [".jlt", "application/vnd.hp-jlyt"],
1414
+ [".pcl", "application/vnd.hp-pcl"],
1415
+ [".pclxl", "application/vnd.hp-pclxl"],
1416
+ [".sfd-hdstx", "application/vnd.hydrostatix.sof-data"],
1417
+ [".x3d", "application/vnd.hzn-3d-crossword"],
1418
+ [".mpy", "application/vnd.ibm.minipay"],
1419
+ [".afp", "application/vnd.ibm.modcap"],
1420
+ [".listafp", "application/vnd.ibm.modcap"],
1421
+ [".list3820", "application/vnd.ibm.modcap"],
1422
+ [".irm", "application/vnd.ibm.rights-management"],
1423
+ [".sc", "application/vnd.ibm.secure-container"],
1424
+ [".icm", "application/vnd.iccprofile"],
1425
+ [".icc", "application/vnd.iccprofile"],
1426
+ [".igl", "application/vnd.igloader"],
1427
+ [".ivp", "application/vnd.immervision-ivp"],
1428
+ [".ivu", "application/vnd.immervision-ivu"],
1429
+ [".xpw", "application/vnd.intercon.formnet"],
1430
+ [".xpx", "application/vnd.intercon.formnet"],
1431
+ [".qbo", "application/vnd.intu.qbo"],
1432
+ [".qfx", "application/vnd.intu.qfx"],
1433
+ [".rcprofile", "application/vnd.ipunplugged.rcprofile"],
1434
+ [".irp", "application/vnd.irepository.package+xml"],
1435
+ [".xpr", "application/vnd.is-xpr"],
1436
+ [".jam", "application/vnd.jam"],
1437
+ [".rms", "application/vnd.jcp.javame.midlet-rms"],
1438
+ [".jisp", "application/vnd.jisp"],
1439
+ [".joda", "application/vnd.joost.joda-archive"],
1440
+ [".ktz", "application/vnd.kahootz"],
1441
+ [".ktr", "application/vnd.kahootz"],
1442
+ [".karbon", "application/vnd.kde.karbon"],
1443
+ [".chrt", "application/vnd.kde.kchart"],
1444
+ [".kfo", "application/vnd.kde.kformula"],
1445
+ [".flw", "application/vnd.kde.kivio"],
1446
+ [".kon", "application/vnd.kde.kontour"],
1447
+ [".kpt", "application/vnd.kde.kpresenter"],
1448
+ [".kpr", "application/vnd.kde.kpresenter"],
1449
+ [".ksp", "application/vnd.kde.kspread"],
1450
+ [".kwd", "application/vnd.kde.kword"],
1451
+ [".kwt", "application/vnd.kde.kword"],
1452
+ [".htke", "application/vnd.kenameaapp"],
1453
+ [".kia", "application/vnd.kidspiration"],
1454
+ [".kne", "application/vnd.kinar"],
1455
+ [".knp", "application/vnd.kinar"],
1456
+ [".skp", "application/vnd.koan"],
1457
+ [".skd", "application/vnd.koan"],
1458
+ [".skt", "application/vnd.koan"],
1459
+ [".skm", "application/vnd.koan"],
1460
+ [".sse", "application/vnd.kodak-descriptor"],
1461
+ [".lbd", "application/vnd.llamagraphics.life-balance.desktop"],
1462
+ [".lbe", "application/vnd.llamagraphics.life-balance.exchange+xml"],
1463
+ [".123", "application/vnd.lotus-1-2-3"],
1464
+ [".apr", "application/vnd.lotus-approach"],
1465
+ [".pre", "application/vnd.lotus-freelance"],
1466
+ [".nsf", "application/vnd.lotus-notes"],
1467
+ [".org", "application/vnd.lotus-organizer"],
1468
+ [".scm", "application/vnd.lotus-screencam"],
1469
+ [".lwp", "application/vnd.lotus-wordpro"],
1470
+ [".portpkg", "application/vnd.macports.portpkg"],
1471
+ [".mcd", "application/vnd.mcd"],
1472
+ [".mc1", "application/vnd.medcalcdata"],
1473
+ [".cdkey", "application/vnd.mediastation.cdkey"],
1474
+ [".mwf", "application/vnd.mfer"],
1475
+ [".mfm", "application/vnd.mfmp"],
1476
+ [".flo", "application/vnd.micrografx.flo"],
1477
+ [".igx", "application/vnd.micrografx.igx"],
1478
+ [".mif", "application/vnd.mif"],
1479
+ [".daf", "application/vnd.mobius.daf"],
1480
+ [".dis", "application/vnd.mobius.dis"],
1481
+ [".mbk", "application/vnd.mobius.mbk"],
1482
+ [".mqy", "application/vnd.mobius.mqy"],
1483
+ [".msl", "application/vnd.mobius.msl"],
1484
+ [".plc", "application/vnd.mobius.plc"],
1485
+ [".txf", "application/vnd.mobius.txf"],
1486
+ [".mpn", "application/vnd.mophun.application"],
1487
+ [".mpc", "application/vnd.mophun.certificate"],
1488
+ [".xul", "application/vnd.mozilla.xul+xml"],
1489
+ [".cil", "application/vnd.ms-artgalry"],
1490
+ [".cab", "application/vnd.ms-cab-compressed"],
1491
+ [".xls", "application/vnd.ms-excel"],
1492
+ [".xlm", "application/vnd.ms-excel"],
1493
+ [".xla", "application/vnd.ms-excel"],
1494
+ [".xlc", "application/vnd.ms-excel"],
1495
+ [".xlt", "application/vnd.ms-excel"],
1496
+ [".xlw", "application/vnd.ms-excel"],
1497
+ [".xlam", "application/vnd.ms-excel.addin.macroenabled.12"],
1498
+ [".xlsb", "application/vnd.ms-excel.sheet.binary.macroenabled.12"],
1499
+ [".xlsm", "application/vnd.ms-excel.sheet.macroenabled.12"],
1500
+ [".xltm", "application/vnd.ms-excel.template.macroenabled.12"],
1501
+ [".eot", "application/vnd.ms-fontobject"],
1502
+ [".chm", "application/vnd.ms-htmlhelp"],
1503
+ [".ims", "application/vnd.ms-ims"],
1504
+ [".lrm", "application/vnd.ms-lrm"],
1505
+ [".cat", "application/vnd.ms-pki.seccat"],
1506
+ [".stl", "application/vnd.ms-pki.stl"],
1507
+ [".pot", "application/vnd.ms-powerpoint"],
1508
+ [".pps", "application/vnd.ms-powerpoint"],
1509
+ [".ppt", "application/vnd.ms-powerpoint"],
1510
+ [".ppam", "application/vnd.ms-powerpoint.addin.macroenabled.12"],
1511
+ [".pptm", "application/vnd.ms-powerpoint.presentation.macroenabled.12"],
1512
+ [".sldm", "application/vnd.ms-powerpoint.slide.macroenabled.12"],
1513
+ [".ppsm", "application/vnd.ms-powerpoint.slideshow.macroenabled.12"],
1514
+ [".potm", "application/vnd.ms-powerpoint.template.macroenabled.12"],
1515
+ [".mpp", "application/vnd.ms-project"],
1516
+ [".mpt", "application/vnd.ms-project"],
1517
+ [".docm", "application/vnd.ms-word.document.macroenabled.12"],
1518
+ [".dotm", "application/vnd.ms-word.template.macroenabled.12"],
1519
+ [".wdb", "application/vnd.ms-works"],
1520
+ [".wcm", "application/vnd.ms-works"],
1521
+ [".wks", "application/vnd.ms-works"],
1522
+ [".wps", "application/vnd.ms-works"],
1523
+ [".wpl", "application/vnd.ms-wpl"],
1524
+ [".xps", "application/vnd.ms-xpsdocument"],
1525
+ [".mseq", "application/vnd.mseq"],
1526
+ [".mus", "application/vnd.musician"],
1527
+ [".msty", "application/vnd.muvee.style"],
1528
+ [".nlu", "application/vnd.neurolanguage.nlu"],
1529
+ [".nnd", "application/vnd.noblenet-directory"],
1530
+ [".nns", "application/vnd.noblenet-sealer"],
1531
+ [".nnw", "application/vnd.noblenet-web"],
1532
+ [".ngdat", "application/vnd.nokia.n-gage.data"],
1533
+ [".n-gage", "application/vnd.nokia.n-gage.symbian.install"],
1534
+ [".rpst", "application/vnd.nokia.radio-preset"],
1535
+ [".rpss", "application/vnd.nokia.radio-presets"],
1536
+ [".edm", "application/vnd.novadigm.edm"],
1537
+ [".edx", "application/vnd.novadigm.edx"],
1538
+ [".ext", "application/vnd.novadigm.ext"],
1539
+ [".odc", "application/vnd.oasis.opendocument.chart"],
1540
+ [".otc", "application/vnd.oasis.opendocument.chart-template"],
1541
+ [".odb", "application/vnd.oasis.opendocument.database"],
1542
+ [".odf", "application/vnd.oasis.opendocument.formula"],
1543
+ [".odft", "application/vnd.oasis.opendocument.formula-template"],
1544
+ [".odg", "application/vnd.oasis.opendocument.graphics"],
1545
+ [".otg", "application/vnd.oasis.opendocument.graphics-template"],
1546
+ [".odi", "application/vnd.oasis.opendocument.image"],
1547
+ [".oti", "application/vnd.oasis.opendocument.image-template"],
1548
+ [".odp", "application/vnd.oasis.opendocument.presentation"],
1549
+ [".ods", "application/vnd.oasis.opendocument.spreadsheet"],
1550
+ [".ots", "application/vnd.oasis.opendocument.spreadsheet-template"],
1551
+ [".odt", "application/vnd.oasis.opendocument.text"],
1552
+ [".otm", "application/vnd.oasis.opendocument.text-master"],
1553
+ [".ott", "application/vnd.oasis.opendocument.text-template"],
1554
+ [".oth", "application/vnd.oasis.opendocument.text-web"],
1555
+ [".xo", "application/vnd.olpc-sugar"],
1556
+ [".dd2", "application/vnd.oma.dd2+xml"],
1557
+ [".oxt", "application/vnd.openofficeorg.extension"],
1558
+ [
1559
+ ".pptx",
1560
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1561
+ ],
1562
+ [
1563
+ ".sldx",
1564
+ "application/vnd.openxmlformats-officedocument.presentationml.slide"
1565
+ ],
1566
+ [
1567
+ ".ppsx",
1568
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow"
1569
+ ],
1570
+ [
1571
+ ".potx",
1572
+ "application/vnd.openxmlformats-officedocument.presentationml.template"
1573
+ ],
1574
+ [
1575
+ ".xlsx",
1576
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
1577
+ ],
1578
+ [
1579
+ ".xltx",
1580
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template"
1581
+ ],
1582
+ [
1583
+ ".docx",
1584
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
1585
+ ],
1586
+ [
1587
+ ".dotx",
1588
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
1589
+ ],
1590
+ [".dp", "application/vnd.osgi.dp"],
1591
+ [".oprc", "application/vnd.palm"],
1592
+ [".pqa", "application/vnd.palm"],
1593
+ [".pdb", "application/vnd.palm"],
1594
+ [".str", "application/vnd.pg.format"],
1595
+ [".ei6", "application/vnd.pg.osasli"],
1596
+ [".efif", "application/vnd.picsel"],
1597
+ [".plf", "application/vnd.pocketlearn"],
1598
+ [".pbd", "application/vnd.powerbuilder6"],
1599
+ [".box", "application/vnd.previewsystems.box"],
1600
+ [".mgz", "application/vnd.proteus.magazine"],
1601
+ [".qps", "application/vnd.publishare-delta-tree"],
1602
+ [".ptid", "application/vnd.pvi.ptid1"],
1603
+ [".qxd", "application/vnd.quark.quarkxpress"],
1604
+ [".qxt", "application/vnd.quark.quarkxpress"],
1605
+ [".qwd", "application/vnd.quark.quarkxpress"],
1606
+ [".qwt", "application/vnd.quark.quarkxpress"],
1607
+ [".qxl", "application/vnd.quark.quarkxpress"],
1608
+ [".qxb", "application/vnd.quark.quarkxpress"],
1609
+ [".mxl", "application/vnd.recordare.musicxml"],
1610
+ [".musicxml", "application/vnd.recordare.musicxml+xml"],
1611
+ [".cod", "application/vnd.rim.cod"],
1612
+ [".rm", "application/vnd.rn-realmedia"],
1613
+ [".link66", "application/vnd.route66.link66+xml"],
1614
+ [".see", "application/vnd.seemail"],
1615
+ [".sema", "application/vnd.sema"],
1616
+ [".semd", "application/vnd.semd"],
1617
+ [".semf", "application/vnd.semf"],
1618
+ [".ifm", "application/vnd.shana.informed.formdata"],
1619
+ [".itp", "application/vnd.shana.informed.formtemplate"],
1620
+ [".iif", "application/vnd.shana.informed.interchange"],
1621
+ [".ipk", "application/vnd.shana.informed.package"],
1622
+ [".twds", "application/vnd.simtech-mindmapper"],
1623
+ [".twd", "application/vnd.simtech-mindmapper"],
1624
+ [".mmf", "application/vnd.smaf"],
1625
+ [".teacher", "application/vnd.smart.teacher"],
1626
+ [".sdkm", "application/vnd.solent.sdkm+xml"],
1627
+ [".sdkd", "application/vnd.solent.sdkm+xml"],
1628
+ [".dxp", "application/vnd.spotfire.dxp"],
1629
+ [".sfs", "application/vnd.spotfire.sfs"],
1630
+ [".sdc", "application/vnd.stardivision.calc"],
1631
+ [".sda", "application/vnd.stardivision.draw"],
1632
+ [".sdd", "application/vnd.stardivision.impress"],
1633
+ [".smf", "application/vnd.stardivision.math"],
1634
+ [".sdw", "application/vnd.stardivision.writer"],
1635
+ [".vor", "application/vnd.stardivision.writer"],
1636
+ [".sgl", "application/vnd.stardivision.writer-global"],
1637
+ [".sxc", "application/vnd.sun.xml.calc"],
1638
+ [".stc", "application/vnd.sun.xml.calc.template"],
1639
+ [".sxd", "application/vnd.sun.xml.draw"],
1640
+ [".std", "application/vnd.sun.xml.draw.template"],
1641
+ [".sxi", "application/vnd.sun.xml.impress"],
1642
+ [".sti", "application/vnd.sun.xml.impress.template"],
1643
+ [".sxm", "application/vnd.sun.xml.math"],
1644
+ [".sxw", "application/vnd.sun.xml.writer"],
1645
+ [".sxg", "application/vnd.sun.xml.writer.global"],
1646
+ [".stw", "application/vnd.sun.xml.writer.template"],
1647
+ [".susp", "application/vnd.sus-calendar"],
1648
+ [".sus", "application/vnd.sus-calendar"],
1649
+ [".svd", "application/vnd.svd"],
1650
+ [".sis", "application/vnd.symbian.install"],
1651
+ [".sisx", "application/vnd.symbian.install"],
1652
+ [".xsm", "application/vnd.syncml+xml"],
1653
+ [".bdm", "application/vnd.syncml.dm+wbxml"],
1654
+ [".xdm", "application/vnd.syncml.dm+xml"],
1655
+ [".tao", "application/vnd.tao.intent-module-archive"],
1656
+ [".tmo", "application/vnd.tmobile-livetv"],
1657
+ [".tpt", "application/vnd.trid.tpt"],
1658
+ [".mxs", "application/vnd.triscape.mxs"],
1659
+ [".tra", "application/vnd.trueapp"],
1660
+ [".ufdl", "application/vnd.ufdl"],
1661
+ [".ufd", "application/vnd.ufdl"],
1662
+ [".utz", "application/vnd.uiq.theme"],
1663
+ [".umj", "application/vnd.umajin"],
1664
+ [".unityweb", "application/vnd.unity"],
1665
+ [".uoml", "application/vnd.uoml+xml"],
1666
+ [".vcx", "application/vnd.vcx"],
1667
+ [".vsw", "application/vnd.visio"],
1668
+ [".vss", "application/vnd.visio"],
1669
+ [".vst", "application/vnd.visio"],
1670
+ [".vsd", "application/vnd.visio"],
1671
+ [".vis", "application/vnd.visionary"],
1672
+ [".vsf", "application/vnd.vsf"],
1673
+ [".wbxml", "application/vnd.wap.wbxml"],
1674
+ [".wmlc", "application/vnd.wap.wmlc"],
1675
+ [".wmlsc", "application/vnd.wap.wmlscriptc"],
1676
+ [".wtb", "application/vnd.webturbo"],
1677
+ [".wpd", "application/vnd.wordperfect"],
1678
+ [".wqd", "application/vnd.wqd"],
1679
+ [".stf", "application/vnd.wt.stf"],
1680
+ [".xar", "application/vnd.xara"],
1681
+ [".xfdl", "application/vnd.xfdl"],
1682
+ [".hvd", "application/vnd.yamaha.hv-dic"],
1683
+ [".hvs", "application/vnd.yamaha.hv-script"],
1684
+ [".hvp", "application/vnd.yamaha.hv-voice"],
1685
+ [".osf", "application/vnd.yamaha.openscoreformat"],
1686
+ [".osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml"],
1687
+ [".saf", "application/vnd.yamaha.smaf-audio"],
1688
+ [".spf", "application/vnd.yamaha.smaf-phrase"],
1689
+ [".cmp", "application/vnd.yellowriver-custom-menu"],
1690
+ [".zir", "application/vnd.zul"],
1691
+ [".zirz", "application/vnd.zul"],
1692
+ [".zaz", "application/vnd.zzazz.deck+xml"],
1693
+ [".vxml", "application/voicexml+xml"],
1694
+ [".hlp", "application/winhlp"],
1695
+ [".wsdl", "application/wsdl+xml"],
1696
+ [".wspolicy", "application/wspolicy+xml"],
1697
+ [".abw", "application/x-abiword"],
1698
+ [".ace", "application/x-ace-compressed"],
1699
+ [".aab", "application/x-authorware-bin"],
1700
+ [".x32", "application/x-authorware-bin"],
1701
+ [".u32", "application/x-authorware-bin"],
1702
+ [".vox", "application/x-authorware-bin"],
1703
+ [".aam", "application/x-authorware-map"],
1704
+ [".aas", "application/x-authorware-seg"],
1705
+ [".bcpio", "application/x-bcpio"],
1706
+ [".torrent", "application/x-bittorrent"],
1707
+ [".bz", "application/x-bzip"],
1708
+ [".bz2", "application/x-bzip2"],
1709
+ [".boz", "application/x-bzip2"],
1710
+ [".vcd", "application/x-cdlink"],
1711
+ [".chat", "application/x-chat"],
1712
+ [".pgn", "application/x-chess-pgn"],
1713
+ [".cpio", "application/x-cpio"],
1714
+ [".csh", "application/x-csh"],
1715
+ [".deb", "application/x-debian-package"],
1716
+ [".udeb", "application/x-debian-package"],
1717
+ [".swa", "application/x-director"],
1718
+ [".w3d", "application/x-director"],
1719
+ [".fgd", "application/x-director"],
1720
+ [".cxt", "application/x-director"],
1721
+ [".cct", "application/x-director"],
1722
+ [".cst", "application/x-director"],
1723
+ [".dxr", "application/x-director"],
1724
+ [".dcr", "application/x-director"],
1725
+ [".dir", "application/x-director"],
1726
+ [".wad", "application/x-doom"],
1727
+ [".ncx", "application/x-dtbncx+xml"],
1728
+ [".dtb", "application/x-dtbook+xml"],
1729
+ [".res", "application/x-dtbresource+xml"],
1730
+ [".dvi", "application/x-dvi"],
1731
+ [".bdf", "application/x-font-bdf"],
1732
+ [".gsf", "application/x-font-ghostscript"],
1733
+ [".psf", "application/x-font-linux-psf"],
1734
+ [".otf", "application/x-font-otf"],
1735
+ [".pcf", "application/x-font-pcf"],
1736
+ [".snf", "application/x-font-snf"],
1737
+ [".ttf", "application/x-font-ttf"],
1738
+ [".ttc", "application/x-font-ttf"],
1739
+ [".woff", "application/font-woff"],
1740
+ [".pfa", "application/x-font-type1"],
1741
+ [".pfb", "application/x-font-type1"],
1742
+ [".pfm", "application/x-font-type1"],
1743
+ [".afm", "application/x-font-type1"],
1744
+ [".spl", "application/x-futuresplash"],
1745
+ [".gnumeric", "application/x-gnumeric"],
1746
+ [".gtar", "application/x-gtar"],
1747
+ [".hdf", "application/x-hdf"],
1748
+ [".jnlp", "application/x-java-jnlp-file"],
1749
+ [".latex", "application/x-latex"],
1750
+ [".prc", "application/x-mobipocket-ebook"],
1751
+ [".mobi", "application/x-mobipocket-ebook"],
1752
+ [".application", "application/x-ms-application"],
1753
+ [".wmd", "application/x-ms-wmd"],
1754
+ [".wmz", "application/x-ms-wmz"],
1755
+ [".xbap", "application/x-ms-xbap"],
1756
+ [".mdb", "application/x-msaccess"],
1757
+ [".obd", "application/x-msbinder"],
1758
+ [".crd", "application/x-mscardfile"],
1759
+ [".clp", "application/x-msclip"],
1760
+ [".msi", "application/x-msdownload"],
1761
+ [".bat", "application/x-msdownload"],
1762
+ [".com", "application/x-msdownload"],
1763
+ [".dll", "application/x-msdownload"],
1764
+ [".exe", "application/x-msdownload"],
1765
+ [".mvb", "application/x-msmediaview"],
1766
+ [".m13", "application/x-msmediaview"],
1767
+ [".m14", "application/x-msmediaview"],
1768
+ [".wmf", "application/x-msmetafile"],
1769
+ [".mny", "application/x-msmoney"],
1770
+ [".pub", "application/x-mspublisher"],
1771
+ [".scd", "application/x-msschedule"],
1772
+ [".trm", "application/x-msterminal"],
1773
+ [".wri", "application/x-mswrite"],
1774
+ [".nc", "application/x-netcdf"],
1775
+ [".cdf", "application/x-netcdf"],
1776
+ [".p12", "application/x-pkcs12"],
1777
+ [".pfx", "application/x-pkcs12"],
1778
+ [".p7b", "application/x-pkcs7-certificates"],
1779
+ [".spc", "application/x-pkcs7-certificates"],
1780
+ [".p7r", "application/x-pkcs7-certreqresp"],
1781
+ [".rar", "application/x-rar-compressed"],
1782
+ [".sh", "application/x-sh"],
1783
+ [".shar", "application/x-shar"],
1784
+ [".swf", "application/x-shockwave-flash"],
1785
+ [".xap", "application/x-silverlight-app"],
1786
+ [".sit", "application/x-stuffit"],
1787
+ [".sitx", "application/x-stuffitx"],
1788
+ [".sv4cpio", "application/x-sv4cpio"],
1789
+ [".sv4crc", "application/x-sv4crc"],
1790
+ [".tar", "application/x-tar"],
1791
+ [".tcl", "application/x-tcl"],
1792
+ [".tex", "application/x-tex"],
1793
+ [".tfm", "application/x-tex-tfm"],
1794
+ [".texinfo", "application/x-texinfo"],
1795
+ [".texi", "application/x-texinfo"],
1796
+ [".ustar", "application/x-ustar"],
1797
+ [".src", "application/x-wais-source"],
1798
+ [".der", "application/x-x509-ca-cert"],
1799
+ [".crt", "application/x-x509-ca-cert"],
1800
+ [".fig", "application/x-xfig"],
1801
+ [".xpi", "application/x-xpinstall"],
1802
+ [".xenc", "application/xenc+xml"],
1803
+ [".xhtml", "application/xhtml+xml"],
1804
+ [".xht", "application/xhtml+xml"],
1805
+ [".xsl", "application/xml"],
1806
+ [".xml", "application/xml"],
1807
+ [".dtd", "application/xml-dtd"],
1808
+ [".xop", "application/xop+xml"],
1809
+ [".xslt", "application/xslt+xml"],
1810
+ [".xspf", "application/xspf+xml"],
1811
+ [".xvm", "application/xv+xml"],
1812
+ [".xvml", "application/xv+xml"],
1813
+ [".xhvml", "application/xv+xml"],
1814
+ [".mxml", "application/xv+xml"],
1815
+ [".zip", "application/zip"],
1816
+ [".adp", "audio/adpcm"],
1817
+ [".au", "audio/basic"],
1818
+ [".snd", "audio/basic"],
1819
+ [".mid", "audio/midi"],
1820
+ [".midi", "audio/midi"],
1821
+ [".kar", "audio/midi"],
1822
+ [".rmi", "audio/midi"],
1823
+ [".mp4a", "audio/mp4"],
1824
+ [".m4a", "audio/mp4a-latm"],
1825
+ [".m4p", "audio/mp4a-latm"],
1826
+ [".m3a", "audio/mpeg"],
1827
+ [".m2a", "audio/mpeg"],
1828
+ [".mp3", "audio/mpeg"],
1829
+ [".mp2a", "audio/mpeg"],
1830
+ [".mp2", "audio/mpeg"],
1831
+ [".mpga", "audio/mpeg"],
1832
+ [".spx", "audio/ogg"],
1833
+ [".ogg", "audio/ogg"],
1834
+ [".oga", "audio/ogg"],
1835
+ [".eol", "audio/vnd.digital-winds"],
1836
+ [".dts", "audio/vnd.dts"],
1837
+ [".dtshd", "audio/vnd.dts.hd"],
1838
+ [".lvp", "audio/vnd.lucent.voice"],
1839
+ [".pya", "audio/vnd.ms-playready.media.pya"],
1840
+ [".ecelp4800", "audio/vnd.nuera.ecelp4800"],
1841
+ [".ecelp7470", "audio/vnd.nuera.ecelp7470"],
1842
+ [".ecelp9600", "audio/vnd.nuera.ecelp9600"],
1843
+ [".aac", "audio/x-aac"],
1844
+ [".aif", "audio/x-aiff"],
1845
+ [".aiff", "audio/x-aiff"],
1846
+ [".aif", "audio/x-aiff"],
1847
+ [".m3u", "audio/x-mpegurl"],
1848
+ [".wax", "audio/x-ms-wax"],
1849
+ [".wma", "audio/x-ms-wma"],
1850
+ [".ram", "audio/x-pn-realaudio"],
1851
+ [".ra", "audio/x-pn-realaudio"],
1852
+ [".rmp", "audio/x-pn-realaudio-plugin"],
1853
+ [".wav", "audio/x-wav"],
1854
+ [".cdx", "chemical/x-cdx"],
1855
+ [".cif", "chemical/x-cif"],
1856
+ [".cmdf", "chemical/x-cmdf"],
1857
+ [".cml", "chemical/x-cml"],
1858
+ [".csml", "chemical/x-csml"],
1859
+ [".xyz", "chemical/x-xyz"],
1860
+ [".bmp", "image/bmp"],
1861
+ [".cgm", "image/cgm"],
1862
+ [".g3", "image/g3fax"],
1863
+ [".gif", "image/gif"],
1864
+ [".ief", "image/ief"],
1865
+ [".jp2", "image/jp2"],
1866
+ [".jpeg", "image/jpeg"],
1867
+ [".jpg", "image/jpeg"],
1868
+ [".jpe", "image/jpeg"],
1869
+ [".pict", "image/pict"],
1870
+ [".pic", "image/pict"],
1871
+ [".pct", "image/pict"],
1872
+ [".png", "image/png"],
1873
+ [".btif", "image/prs.btif"],
1874
+ [".svg", "image/svg+xml"],
1875
+ [".svgz", "image/svg+xml"],
1876
+ [".tiff", "image/tiff"],
1877
+ [".tif", "image/tiff"],
1878
+ [".psd", "image/vnd.adobe.photoshop"],
1879
+ [".djvu", "image/vnd.djvu"],
1880
+ [".djv", "image/vnd.djvu"],
1881
+ [".dwg", "image/vnd.dwg"],
1882
+ [".dxf", "image/vnd.dxf"],
1883
+ [".fbs", "image/vnd.fastbidsheet"],
1884
+ [".fpx", "image/vnd.fpx"],
1885
+ [".fst", "image/vnd.fst"],
1886
+ [".mmr", "image/vnd.fujixerox.edmics-mmr"],
1887
+ [".rlc", "image/vnd.fujixerox.edmics-rlc"],
1888
+ [".mdi", "image/vnd.ms-modi"],
1889
+ [".npx", "image/vnd.net-fpx"],
1890
+ [".wbmp", "image/vnd.wap.wbmp"],
1891
+ [".xif", "image/vnd.xiff"],
1892
+ [".ras", "image/x-cmu-raster"],
1893
+ [".cmx", "image/x-cmx"],
1894
+ [".fh", "image/x-freehand"],
1895
+ [".fhc", "image/x-freehand"],
1896
+ [".fh4", "image/x-freehand"],
1897
+ [".fh5", "image/x-freehand"],
1898
+ [".fh7", "image/x-freehand"],
1899
+ [".ico", "image/x-icon"],
1900
+ [".pntg", "image/x-macpaint"],
1901
+ [".pnt", "image/x-macpaint"],
1902
+ [".mac", "image/x-macpaint"],
1903
+ [".pcx", "image/x-pcx"],
1904
+ [".pic", "image/x-pict"],
1905
+ [".pct", "image/x-pict"],
1906
+ [".pnm", "image/x-portable-anymap"],
1907
+ [".pbm", "image/x-portable-bitmap"],
1908
+ [".pgm", "image/x-portable-graymap"],
1909
+ [".ppm", "image/x-portable-pixmap"],
1910
+ [".qtif", "image/x-quicktime"],
1911
+ [".qti", "image/x-quicktime"],
1912
+ [".rgb", "image/x-rgb"],
1913
+ [".xbm", "image/x-xbitmap"],
1914
+ [".xpm", "image/x-xpixmap"],
1915
+ [".xwd", "image/x-xwindowdump"],
1916
+ [".eml", "message/rfc822"],
1917
+ [".mime", "message/rfc822"],
1918
+ [".igs", "model/iges"],
1919
+ [".iges", "model/iges"],
1920
+ [".msh", "model/mesh"],
1921
+ [".mesh", "model/mesh"],
1922
+ [".silo", "model/mesh"],
1923
+ [".dwf", "model/vnd.dwf"],
1924
+ [".gdl", "model/vnd.gdl"],
1925
+ [".gtw", "model/vnd.gtw"],
1926
+ [".mts", "model/vnd.mts"],
1927
+ [".vtu", "model/vnd.vtu"],
1928
+ [".wrl", "model/vrml"],
1929
+ [".vrml", "model/vrml"],
1930
+ [".ics", "text/calendar"],
1931
+ [".ifb", "text/calendar"],
1932
+ [".css", "text/css"],
1933
+ [".csv", "text/csv"],
1934
+ [".html", "text/html"],
1935
+ [".htm", "text/html"],
1936
+ [".txt", "text/plain"],
1937
+ [".text", "text/plain"],
1938
+ [".conf", "text/plain"],
1939
+ [".def", "text/plain"],
1940
+ [".list", "text/plain"],
1941
+ [".log", "text/plain"],
1942
+ [".in", "text/plain"],
1943
+ [".dsc", "text/prs.lines.tag"],
1944
+ [".rtx", "text/richtext"],
1945
+ [".sgml", "text/sgml"],
1946
+ [".sgm", "text/sgml"],
1947
+ [".tsv", "text/tab-separated-values"],
1948
+ [".t", "text/troff"],
1949
+ [".tr", "text/troff"],
1950
+ [".roff", "text/troff"],
1951
+ [".man", "text/troff"],
1952
+ [".me", "text/troff"],
1953
+ [".ms", "text/troff"],
1954
+ [".uri", "text/uri-list"],
1955
+ [".uris", "text/uri-list"],
1956
+ [".urls", "text/uri-list"],
1957
+ [".curl", "text/vnd.curl"],
1958
+ [".dcurl", "text/vnd.curl.dcurl"],
1959
+ [".scurl", "text/vnd.curl.scurl"],
1960
+ [".mcurl", "text/vnd.curl.mcurl"],
1961
+ [".fly", "text/vnd.fly"],
1962
+ [".flx", "text/vnd.fmi.flexstor"],
1963
+ [".gv", "text/vnd.graphviz"],
1964
+ [".3dml", "text/vnd.in3d.3dml"],
1965
+ [".spot", "text/vnd.in3d.spot"],
1966
+ [".jad", "text/vnd.sun.j2me.app-descriptor"],
1967
+ [".wml", "text/vnd.wap.wml"],
1968
+ [".wmls", "text/vnd.wap.wmlscript"],
1969
+ [".s", "text/x-asm"],
1970
+ [".asm", "text/x-asm"],
1971
+ [".c", "text/x-c"],
1972
+ [".cc", "text/x-c"],
1973
+ [".cxx", "text/x-c"],
1974
+ [".cpp", "text/x-c"],
1975
+ [".h", "text/x-c"],
1976
+ [".hh", "text/x-c"],
1977
+ [".dic", "text/x-c"],
1978
+ [".f", "text/x-fortran"],
1979
+ [".for", "text/x-fortran"],
1980
+ [".f77", "text/x-fortran"],
1981
+ [".f90", "text/x-fortran"],
1982
+ [".p", "text/x-pascal"],
1983
+ [".pas", "text/x-pascal"],
1984
+ [".java", "text/x-java-source"],
1985
+ [".etx", "text/x-setext"],
1986
+ [".uu", "text/x-uuencode"],
1987
+ [".vcs", "text/x-vcalendar"],
1988
+ [".vcf", "text/x-vcard"],
1989
+ [".3gp", "video/3gpp"],
1990
+ [".3g2", "video/3gpp2"],
1991
+ [".h261", "video/h261"],
1992
+ [".h263", "video/h263"],
1993
+ [".h264", "video/h264"],
1994
+ [".jpgv", "video/jpeg"],
1995
+ [".jpm", "video/jpm"],
1996
+ [".jpgm", "video/jpm"],
1997
+ [".mj2", "video/mj2"],
1998
+ [".mjp2", "video/mj2"],
1999
+ [".mp4", "video/mp4"],
2000
+ [".mp4v", "video/mp4"],
2001
+ [".mpg4", "video/mp4"],
2002
+ [".m4v", "video/mp4"],
2003
+ [".mkv", "video/x-matroska"],
2004
+ [".mk3d", "video/x-matroska"],
2005
+ [".mka", "video/x-matroska"],
2006
+ [".mks", "video/x-matroska"],
2007
+ [".webm", "video/webm"],
2008
+ [".mpeg", "video/mpeg"],
2009
+ [".mpg", "video/mpeg"],
2010
+ [".mpe", "video/mpeg"],
2011
+ [".m1v", "video/mpeg"],
2012
+ [".m2v", "video/mpeg"],
2013
+ [".ogv", "video/ogg"],
2014
+ [".qt", "video/quicktime"],
2015
+ [".mov", "video/quicktime"],
2016
+ [".fvt", "video/vnd.fvt"],
2017
+ [".mxu", "video/vnd.mpegurl"],
2018
+ [".m4u", "video/vnd.mpegurl"],
2019
+ [".pyv", "video/vnd.ms-playready.media.pyv"],
2020
+ [".viv", "video/vnd.vivo"],
2021
+ [".dv", "video/x-dv"],
2022
+ [".dif", "video/x-dv"],
2023
+ [".f4v", "video/x-f4v"],
2024
+ [".fli", "video/x-fli"],
2025
+ [".flv", "video/x-flv"],
2026
+ [".m4v", "video/x-m4v"],
2027
+ [".asf", "video/x-ms-asf"],
2028
+ [".asx", "video/x-ms-asf"],
2029
+ [".wm", "video/x-ms-wm"],
2030
+ [".wmv", "video/x-ms-wmv"],
2031
+ [".wmx", "video/x-ms-wmx"],
2032
+ [".wvx", "video/x-ms-wvx"],
2033
+ [".avi", "video/x-msvideo"],
2034
+ [".movie", "video/x-sgi-movie"],
2035
+ [".ice", "x-conference/x-cooltalk"],
2036
+ [".indd", "application/x-indesign"],
2037
+ [".dat", "application/octet-stream"],
2038
+ [".gz", "application/x-gzip"],
2039
+ [".tgz", "application/x-tar"],
2040
+ [".tar", "application/x-tar"],
2041
+ [".epub", "application/epub+zip"],
2042
+ [".mobi", "application/x-mobipocket-ebook"],
2043
+ ["README", "text/plain"],
2044
+ ["LICENSE", "text/plain"],
2045
+ ["COPYING", "text/plain"],
2046
+ ["TODO", "text/plain"],
2047
+ ["ABOUT", "text/plain"],
2048
+ ["AUTHORS", "text/plain"],
2049
+ ["CONTRIBUTORS", "text/plain"],
2050
+ ["manifest", "text/cache-manifest"],
2051
+ [".manifest", "text/cache-manifest"],
2052
+ [".mf", "text/cache-manifest"],
2053
+ [".appcache", "text/cache-manifest"]
2054
+ ]);
2055
+ const setMime = (ext, mimeType) => {
2056
+ MimeType.set(ext, mimeType);
2057
+ return MimeType;
2058
+ };
2059
+ function getMime(ext) {
2060
+ const tmp = ("" + ext).trim().toLowerCase();
2061
+ let idx = tmp.lastIndexOf(".");
2062
+ const suffix = !~idx ? tmp : tmp.substring(++idx);
2063
+ return MimeType.get(`.${suffix}`) || MimeType.get(suffix);
1103
2064
  }
1104
2065
  const vnode = {
1105
2066
  init,
@@ -1107,11 +2068,14 @@ const vnode = {
1107
2068
  };
1108
2069
  export {
1109
2070
  Subscribe as EventEmitter,
2071
+ MimeType,
1110
2072
  Monitor,
1111
2073
  filterObj,
2074
+ getMime,
1112
2075
  queryFileInfo,
1113
2076
  readDir,
1114
2077
  readFile,
2078
+ setMime,
1115
2079
  str2Xml,
1116
2080
  vnode,
1117
2081
  watchFile,