@xyo-network/wasm 2.110.10 → 2.110.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"WasmSupport.d.ts","sourceRoot":"","sources":["../../src/WasmSupport.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,oBAAoB;;;;;;;;;;iGAoCa,CAAC;;qEAmB7C,CAAA;;;;;;;;4EAdA,CAHF;;;;;;;;;;;;;;CArBU,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,oBAAoB,CAAA;AAE3D,qBAAa,WAAW;IAeV,SAAS,CAAC,eAAe,EAAE,WAAW,EAAE;IAdpD,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,eAAe,CAA4C;IACnE,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,0BAA0B,CAAQ;gBAUpB,eAAe,EAAE,WAAW,EAAE;IAKpD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,UAAU,IAAI,OAAO,CASxB;IAMD,IAAI,cAAc,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAEpE;IAKD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAMD,IAAI,aAAa,IAAI,OAAO,CAE3B;WASY,MAAM,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAWnE,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAOjB,qBAAqB,I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CAAC,eAAe,EAAE,WAAW,EAAE;IAdpD,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,eAAe,CAA4C;IACnE,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,0BAA0B,CAAQ;gBAUpB,eAAe,EAAE,WAAW,EAAE;IAKpD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,UAAU,IAAI,OAAO,CASxB;IAMD,IAAI,cAAc,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAEpE;IAKD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAID,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,EAEvB;IAMD,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAMD,IAAI,aAAa,IAAI,OAAO,CAE3B;WASY,MAAM,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAWnE,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAQvD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;cAMjB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;CAQvD"}
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
6
  var __export = (target, all) => {
8
7
  for (var name in all)
9
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -37,7 +36,7 @@ var WasmFeatureDetectors = {
37
36
  memory64: import_wasm_feature_detect.memory64,
38
37
  multiValue: import_wasm_feature_detect.multiValue,
39
38
  mutableGlobals: import_wasm_feature_detect.mutableGlobals,
40
- referenceTypes: /* @__PURE__ */ __name(() => Promise, "referenceTypes"),
39
+ referenceTypes: () => Promise,
41
40
  relaxedSimd: import_wasm_feature_detect.relaxedSimd,
42
41
  saturatedFloatToInt: import_wasm_feature_detect.saturatedFloatToInt,
43
42
  signExtensions: import_wasm_feature_detect.signExtensions,
@@ -47,47 +46,38 @@ var WasmFeatureDetectors = {
47
46
  threads: import_wasm_feature_detect.threads
48
47
  };
49
48
  var WasmSupport = class _WasmSupport {
50
- static {
51
- __name(this, "WasmSupport");
52
- }
53
- desiredFeatures;
54
- _allowWasm;
55
- _featureSupport;
56
- _forceWasm;
57
- _isInitialized;
58
- _isWasmFeatureSetSupported;
59
49
  /**
60
- * Instance constructor for use where async instantiation
61
- * is not possible. Where possible, prefer the static
62
- * create method over use of this constructor directly
63
- * as no initialization (feature detection) is able to
64
- * be done here
65
- * @param desiredFeatures The desired feature set
66
- */
50
+ * Instance constructor for use where async instantiation
51
+ * is not possible. Where possible, prefer the static
52
+ * create method over use of this constructor directly
53
+ * as no initialization (feature detection) is able to
54
+ * be done here
55
+ * @param desiredFeatures The desired feature set
56
+ */
67
57
  constructor(desiredFeatures) {
68
58
  this.desiredFeatures = desiredFeatures;
69
- this._allowWasm = true;
70
- this._featureSupport = {};
71
- this._forceWasm = false;
72
- this._isInitialized = false;
73
- this._isWasmFeatureSetSupported = false;
74
59
  }
60
+ _allowWasm = true;
61
+ _featureSupport = {};
62
+ _forceWasm = false;
63
+ _isInitialized = false;
64
+ _isWasmFeatureSetSupported = false;
75
65
  /**
76
- * Is Wasm allowed
77
- */
66
+ * Is Wasm allowed
67
+ */
78
68
  get allowWasm() {
79
69
  return this._allowWasm;
80
70
  }
81
71
  /**
82
- * Whether or not to allow WASM usage
83
- */
72
+ * Whether or not to allow WASM usage
73
+ */
84
74
  set allowWasm(v) {
85
75
  this._allowWasm = v;
86
76
  }
87
77
  /**
88
- * Whether or not Wasm should be used based on the desired
89
- * feature set, initialization state, or force-use settings
90
- */
78
+ * Whether or not Wasm should be used based on the desired
79
+ * feature set, initialization state, or force-use settings
80
+ */
91
81
  get canUseWasm() {
92
82
  return (
93
83
  // Just force WASM
@@ -97,69 +87,66 @@ var WasmSupport = class _WasmSupport {
97
87
  );
98
88
  }
99
89
  /**
100
- * Returns a object containing a property for each desired wasm feature
101
- * with a boolean value indicating whether or not the feature is supported
102
- */
90
+ * Returns a object containing a property for each desired wasm feature
91
+ * with a boolean value indicating whether or not the feature is supported
92
+ */
103
93
  get featureSupport() {
104
- return {
105
- ...this._featureSupport
106
- };
94
+ return { ...this._featureSupport };
107
95
  }
108
96
  /**
109
- * Force use of Wasm
110
- */
97
+ * Force use of Wasm
98
+ */
111
99
  get forceWasm() {
112
100
  return this._forceWasm;
113
101
  }
114
102
  /**
115
- * Whether or not to force Wasm usage
116
- */
103
+ * Whether or not to force Wasm usage
104
+ */
117
105
  set forceWasm(v) {
118
106
  this._forceWasm = v;
119
107
  }
120
108
  /**
121
- * Whether or not Wasm is supported based
122
- * on the desired feature set
123
- */
109
+ * Whether or not Wasm is supported based
110
+ * on the desired feature set
111
+ */
124
112
  get isDesiredFeatureSetSupported() {
125
113
  return this._isWasmFeatureSetSupported;
126
114
  }
127
115
  /**
128
- * Whether or not Wasm detection has been run
129
- * for the desired feature set
130
- */
116
+ * Whether or not Wasm detection has been run
117
+ * for the desired feature set
118
+ */
131
119
  get isInitialized() {
132
120
  return this._isInitialized;
133
121
  }
134
122
  /**
135
- * Static creation & async initialization for use where
136
- * async instantiation is possible
137
- * @param desiredFeatures The desired feature set
138
- * @returns An initialized instance of the class with detection
139
- * for the desired feature set
140
- */
123
+ * Static creation & async initialization for use where
124
+ * async instantiation is possible
125
+ * @param desiredFeatures The desired feature set
126
+ * @returns An initialized instance of the class with detection
127
+ * for the desired feature set
128
+ */
141
129
  static async create(desiredFeatures) {
142
130
  const instance = new _WasmSupport(desiredFeatures);
143
131
  await instance.initialize();
144
132
  return instance;
145
133
  }
146
134
  /**
147
- * Checks for specific wasm features
148
- * @param features The list of features to check for
149
- * @returns True if all the features are supported, false otherwise
150
- */
135
+ * Checks for specific wasm features
136
+ * @param features The list of features to check for
137
+ * @returns True if all the features are supported, false otherwise
138
+ */
151
139
  async featureCheck(features) {
152
140
  const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()));
153
141
  return results.every(Boolean);
154
142
  }
155
143
  /**
156
- * Does feature detection for the desired feature set
157
- */
144
+ * Does feature detection for the desired feature set
145
+ */
158
146
  async initialize() {
159
147
  if (this._isInitialized) return;
160
148
  await this.detectDesiredFeatures();
161
149
  this._isInitialized = true;
162
- return;
163
150
  }
164
151
  async detectDesiredFeatures() {
165
152
  for (let feature = 0; feature < this.desiredFeatures.length; feature++) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/WasmSupport.ts"],"sourcesContent":["export * from './WasmSupport.js'\n","import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: () => Promise<boolean>,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n return\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,iCAgBO;AAEA,IAAMA,uBAAuB;EAClCC,QAAQA;EACRC,YAAYA;EACZC,YAAYA;EACZC,eAAeA;EACfC,IAAIA;EACJC,UAAUA;EACVC,YAAYA;EACZC,gBAAgBA;EAChBC,gBAAgB,6BAAMC,SAAN;EAChBC,aAAaA;EACbC,qBAAqBA;EACrBC,gBAAgBA;EAChBC,MAAMA;EACNC,sBAAsBA;EACtBC,UAAUA;EACVC,SAASA;AACX;AAIO,IAAMC,cAAN,MAAMA,aAAAA;EAvCb,OAuCaA;;;;EACHC;EACAC;EACAC;EACAC;EACAC;;;;;;;;;EAURC,YAAsBC,iBAAgC;SAAhCA,kBAAAA;SAddN,aAAa;SACbC,kBAAyD,CAAC;SAC1DC,aAAa;SACbC,iBAAiB;SACjBC,6BAA6B;EAUkB;;;;EAKvD,IAAIG,YAAqB;AACvB,WAAO,KAAKP;EACd;;;;EAIA,IAAIO,UAAUC,GAAY;AACxB,SAAKR,aAAaQ;EACpB;;;;;EAMA,IAAIC,aAAsB;AACxB;;MAEE,KAAKP;MAEJ,KAAKF,cAAc,CAAC,KAAKG;MAEzB,KAAKH,cAAc,KAAKG,kBAAkB,KAAKC;;EAEpD;;;;;EAMA,IAAIM,iBAAkE;AACpE,WAAO;MAAE,GAAG,KAAKT;IAAgB;EACnC;;;;EAKA,IAAIU,YAAqB;AACvB,WAAO,KAAKT;EACd;;;;EAIA,IAAIS,UAAUH,GAAY;AACxB,SAAKN,aAAaM;EACpB;;;;;EAMA,IAAII,+BAAwC;AAC1C,WAAO,KAAKR;EACd;;;;;EAMA,IAAIS,gBAAyB;AAC3B,WAAO,KAAKV;EACd;;;;;;;;EASA,aAAaW,OAAOR,iBAAsD;AACxE,UAAMS,WAAW,IAAIhB,aAAYO,eAAAA;AACjC,UAAMS,SAASC,WAAU;AACzB,WAAOD;EACT;;;;;;EAOA,MAAME,aAAaC,UAA2C;AAC5D,UAAMC,UAAU,MAAM5B,QAAQ6B,IAAIF,SAASG,IAAI,CAACC,YAAYzC,qBAAqByC,OAAAA,CAAQ,EAAED,IAAI,OAAOE,aAAa,MAAMA,SAAAA,CAAAA,CAAAA;AACzH,WAAOJ,QAAQK,MAAMC,OAAAA;EACvB;;;;EAKA,MAAMT,aAA4B;AAChC,QAAI,KAAKb,eAAgB;AACzB,UAAM,KAAKuB,sBAAqB;AAChC,SAAKvB,iBAAiB;AACtB;EACF;EAEA,MAAgBuB,wBAAuC;AACrD,aAASJ,UAAU,GAAGA,UAAU,KAAKhB,gBAAgBqB,QAAQL,WAAW;AACtE,YAAMM,iBAAiB,KAAKtB,gBAAgBgB,OAAAA;AAC5C,YAAMC,WAAW1C,qBAAqB+C,cAAAA;AACtC,WAAK3B,gBAAgB2B,cAAAA,IAAmB,MAAML,SAAAA,IAAc,OAAO;IACrE;AACA,SAAKnB,6BAA6ByB,OAAOC,OAAO,KAAK7B,eAAe,EAAEuB,MAAMC,OAAAA;EAC9E;AACF;","names":["WasmFeatureDetectors","bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","Promise","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmSupport","_allowWasm","_featureSupport","_forceWasm","_isInitialized","_isWasmFeatureSetSupported","constructor","desiredFeatures","allowWasm","v","canUseWasm","featureSupport","forceWasm","isDesiredFeatureSetSupported","isInitialized","create","instance","initialize","featureCheck","features","results","all","map","feature","detector","every","Boolean","detectDesiredFeatures","length","desiredFeature","Object","values"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/WasmSupport.ts"],"sourcesContent":["export * from './WasmSupport.js'\n","import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: () => Promise<boolean>,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA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AA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,gBAAyB;AAC3B,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,aAAa,OAAO,iBAAsD;AACxE,UAAM,WAAW,IAAI,aAAY,eAAe;AAChD,UAAM,SAAS,WAAW;AAC1B,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,aAAa,UAA2C;AAC5D,UAAM,UAAU,MAAM,QAAQ,IAAI,SAAS,IAAI,CAAC,YAAY,qBAAqB,OAAO,CAAC,EAAE,IAAI,OAAO,aAAa,MAAM,SAAS,CAAC,CAAC;AACpI,WAAO,QAAQ,MAAM,OAAO;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,aAA4B;AAChC,QAAI,KAAK,eAAgB;AACzB,UAAM,KAAK,sBAAsB;AACjC,SAAK,iBAAiB;AAAA,EACxB;AAAA,EAEA,MAAgB,wBAAuC;AACrD,aAAS,UAAU,GAAG,UAAU,KAAK,gBAAgB,QAAQ,WAAW;AACtE,YAAM,iBAAiB,KAAK,gBAAgB,OAAO;AACnD,YAAM,WAAW,qBAAqB,cAAc;AACpD,WAAK,gBAAgB,cAAc,IAAK,MAAM,SAAS,IAAK,OAAO;AAAA,IACrE;AACA,SAAK,6BAA6B,OAAO,OAAO,KAAK,eAAe,EAAE,MAAM,OAAO;AAAA,EACrF;AACF;","names":[]}
@@ -1,8 +1,21 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/WasmSupport.ts
5
- import { bigInt, bulkMemory, exceptions, extendedConst, gc, memory64, multiValue, mutableGlobals, relaxedSimd, saturatedFloatToInt, signExtensions, simd, streamingCompilation, tailCall, threads } from "wasm-feature-detect";
2
+ import {
3
+ bigInt,
4
+ bulkMemory,
5
+ exceptions,
6
+ extendedConst,
7
+ gc,
8
+ memory64,
9
+ multiValue,
10
+ mutableGlobals,
11
+ relaxedSimd,
12
+ saturatedFloatToInt,
13
+ signExtensions,
14
+ simd,
15
+ streamingCompilation,
16
+ tailCall,
17
+ threads
18
+ } from "wasm-feature-detect";
6
19
  var WasmFeatureDetectors = {
7
20
  bigInt,
8
21
  bulkMemory,
@@ -12,7 +25,7 @@ var WasmFeatureDetectors = {
12
25
  memory64,
13
26
  multiValue,
14
27
  mutableGlobals,
15
- referenceTypes: /* @__PURE__ */ __name(() => Promise, "referenceTypes"),
28
+ referenceTypes: () => Promise,
16
29
  relaxedSimd,
17
30
  saturatedFloatToInt,
18
31
  signExtensions,
@@ -22,47 +35,38 @@ var WasmFeatureDetectors = {
22
35
  threads
23
36
  };
24
37
  var WasmSupport = class _WasmSupport {
25
- static {
26
- __name(this, "WasmSupport");
27
- }
28
- desiredFeatures;
29
- _allowWasm;
30
- _featureSupport;
31
- _forceWasm;
32
- _isInitialized;
33
- _isWasmFeatureSetSupported;
34
38
  /**
35
- * Instance constructor for use where async instantiation
36
- * is not possible. Where possible, prefer the static
37
- * create method over use of this constructor directly
38
- * as no initialization (feature detection) is able to
39
- * be done here
40
- * @param desiredFeatures The desired feature set
41
- */
39
+ * Instance constructor for use where async instantiation
40
+ * is not possible. Where possible, prefer the static
41
+ * create method over use of this constructor directly
42
+ * as no initialization (feature detection) is able to
43
+ * be done here
44
+ * @param desiredFeatures The desired feature set
45
+ */
42
46
  constructor(desiredFeatures) {
43
47
  this.desiredFeatures = desiredFeatures;
44
- this._allowWasm = true;
45
- this._featureSupport = {};
46
- this._forceWasm = false;
47
- this._isInitialized = false;
48
- this._isWasmFeatureSetSupported = false;
49
48
  }
49
+ _allowWasm = true;
50
+ _featureSupport = {};
51
+ _forceWasm = false;
52
+ _isInitialized = false;
53
+ _isWasmFeatureSetSupported = false;
50
54
  /**
51
- * Is Wasm allowed
52
- */
55
+ * Is Wasm allowed
56
+ */
53
57
  get allowWasm() {
54
58
  return this._allowWasm;
55
59
  }
56
60
  /**
57
- * Whether or not to allow WASM usage
58
- */
61
+ * Whether or not to allow WASM usage
62
+ */
59
63
  set allowWasm(v) {
60
64
  this._allowWasm = v;
61
65
  }
62
66
  /**
63
- * Whether or not Wasm should be used based on the desired
64
- * feature set, initialization state, or force-use settings
65
- */
67
+ * Whether or not Wasm should be used based on the desired
68
+ * feature set, initialization state, or force-use settings
69
+ */
66
70
  get canUseWasm() {
67
71
  return (
68
72
  // Just force WASM
@@ -72,69 +76,66 @@ var WasmSupport = class _WasmSupport {
72
76
  );
73
77
  }
74
78
  /**
75
- * Returns a object containing a property for each desired wasm feature
76
- * with a boolean value indicating whether or not the feature is supported
77
- */
79
+ * Returns a object containing a property for each desired wasm feature
80
+ * with a boolean value indicating whether or not the feature is supported
81
+ */
78
82
  get featureSupport() {
79
- return {
80
- ...this._featureSupport
81
- };
83
+ return { ...this._featureSupport };
82
84
  }
83
85
  /**
84
- * Force use of Wasm
85
- */
86
+ * Force use of Wasm
87
+ */
86
88
  get forceWasm() {
87
89
  return this._forceWasm;
88
90
  }
89
91
  /**
90
- * Whether or not to force Wasm usage
91
- */
92
+ * Whether or not to force Wasm usage
93
+ */
92
94
  set forceWasm(v) {
93
95
  this._forceWasm = v;
94
96
  }
95
97
  /**
96
- * Whether or not Wasm is supported based
97
- * on the desired feature set
98
- */
98
+ * Whether or not Wasm is supported based
99
+ * on the desired feature set
100
+ */
99
101
  get isDesiredFeatureSetSupported() {
100
102
  return this._isWasmFeatureSetSupported;
101
103
  }
102
104
  /**
103
- * Whether or not Wasm detection has been run
104
- * for the desired feature set
105
- */
105
+ * Whether or not Wasm detection has been run
106
+ * for the desired feature set
107
+ */
106
108
  get isInitialized() {
107
109
  return this._isInitialized;
108
110
  }
109
111
  /**
110
- * Static creation & async initialization for use where
111
- * async instantiation is possible
112
- * @param desiredFeatures The desired feature set
113
- * @returns An initialized instance of the class with detection
114
- * for the desired feature set
115
- */
112
+ * Static creation & async initialization for use where
113
+ * async instantiation is possible
114
+ * @param desiredFeatures The desired feature set
115
+ * @returns An initialized instance of the class with detection
116
+ * for the desired feature set
117
+ */
116
118
  static async create(desiredFeatures) {
117
119
  const instance = new _WasmSupport(desiredFeatures);
118
120
  await instance.initialize();
119
121
  return instance;
120
122
  }
121
123
  /**
122
- * Checks for specific wasm features
123
- * @param features The list of features to check for
124
- * @returns True if all the features are supported, false otherwise
125
- */
124
+ * Checks for specific wasm features
125
+ * @param features The list of features to check for
126
+ * @returns True if all the features are supported, false otherwise
127
+ */
126
128
  async featureCheck(features) {
127
129
  const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()));
128
130
  return results.every(Boolean);
129
131
  }
130
132
  /**
131
- * Does feature detection for the desired feature set
132
- */
133
+ * Does feature detection for the desired feature set
134
+ */
133
135
  async initialize() {
134
136
  if (this._isInitialized) return;
135
137
  await this.detectDesiredFeatures();
136
138
  this._isInitialized = true;
137
- return;
138
139
  }
139
140
  async detectDesiredFeatures() {
140
141
  for (let feature = 0; feature < this.desiredFeatures.length; feature++) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/WasmSupport.ts"],"sourcesContent":["import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: () => Promise<boolean>,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n return\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._isWasmFeatureSetSupported = Object.values(this._featureSupport).every(Boolean)\n }\n}\n"],"mappings":";;;;AAAA,SACEA,QACAC,YACAC,YACAC,eACAC,IACAC,UACAC,YACAC,gBACAC,aACAC,qBACAC,gBACAC,MACAC,sBACAC,UACAC,eACK;AAEA,IAAMC,uBAAuB;EAClCC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC,gBAAgB,6BAAMC,SAAN;EAChBC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;AACF;AAIO,IAAMC,cAAN,MAAMA,aAAAA;EAvCb,OAuCaA;;;;EACHC;EACAC;EACAC;EACAC;EACAC;;;;;;;;;EAURC,YAAsBC,iBAAgC;SAAhCA,kBAAAA;SAddN,aAAa;SACbC,kBAAyD,CAAC;SAC1DC,aAAa;SACbC,iBAAiB;SACjBC,6BAA6B;EAUkB;;;;EAKvD,IAAIG,YAAqB;AACvB,WAAO,KAAKP;EACd;;;;EAIA,IAAIO,UAAUC,GAAY;AACxB,SAAKR,aAAaQ;EACpB;;;;;EAMA,IAAIC,aAAsB;AACxB;;MAEE,KAAKP;MAEJ,KAAKF,cAAc,CAAC,KAAKG;MAEzB,KAAKH,cAAc,KAAKG,kBAAkB,KAAKC;;EAEpD;;;;;EAMA,IAAIM,iBAAkE;AACpE,WAAO;MAAE,GAAG,KAAKT;IAAgB;EACnC;;;;EAKA,IAAIU,YAAqB;AACvB,WAAO,KAAKT;EACd;;;;EAIA,IAAIS,UAAUH,GAAY;AACxB,SAAKN,aAAaM;EACpB;;;;;EAMA,IAAII,+BAAwC;AAC1C,WAAO,KAAKR;EACd;;;;;EAMA,IAAIS,gBAAyB;AAC3B,WAAO,KAAKV;EACd;;;;;;;;EASA,aAAaW,OAAOR,iBAAsD;AACxE,UAAMS,WAAW,IAAIhB,aAAYO,eAAAA;AACjC,UAAMS,SAASC,WAAU;AACzB,WAAOD;EACT;;;;;;EAOA,MAAME,aAAaC,UAA2C;AAC5D,UAAMC,UAAU,MAAM5B,QAAQ6B,IAAIF,SAASG,IAAI,CAACC,YAAYzC,qBAAqByC,OAAAA,CAAQ,EAAED,IAAI,OAAOE,aAAa,MAAMA,SAAAA,CAAAA,CAAAA;AACzH,WAAOJ,QAAQK,MAAMC,OAAAA;EACvB;;;;EAKA,MAAMT,aAA4B;AAChC,QAAI,KAAKb,eAAgB;AACzB,UAAM,KAAKuB,sBAAqB;AAChC,SAAKvB,iBAAiB;AACtB;EACF;EAEA,MAAgBuB,wBAAuC;AACrD,aAASJ,UAAU,GAAGA,UAAU,KAAKhB,gBAAgBqB,QAAQL,WAAW;AACtE,YAAMM,iBAAiB,KAAKtB,gBAAgBgB,OAAAA;AAC5C,YAAMC,WAAW1C,qBAAqB+C,cAAAA;AACtC,WAAK3B,gBAAgB2B,cAAAA,IAAmB,MAAML,SAAAA,IAAc,OAAO;IACrE;AACA,SAAKnB,6BAA6ByB,OAAOC,OAAO,KAAK7B,eAAe,EAAEuB,MAAMC,OAAAA;EAC9E;AACF;","names":["bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmFeatureDetectors","bigInt","bulkMemory","exceptions","extendedConst","gc","memory64","multiValue","mutableGlobals","referenceTypes","Promise","relaxedSimd","saturatedFloatToInt","signExtensions","simd","streamingCompilation","tailCall","threads","WasmSupport","_allowWasm","_featureSupport","_forceWasm","_isInitialized","_isWasmFeatureSetSupported","constructor","desiredFeatures","allowWasm","v","canUseWasm","featureSupport","forceWasm","isDesiredFeatureSetSupported","isInitialized","create","instance","initialize","featureCheck","features","results","all","map","feature","detector","every","Boolean","detectDesiredFeatures","length","desiredFeature","Object","values"]}
1
+ {"version":3,"sources":["../../src/WasmSupport.ts"],"sourcesContent":["import {\n bigInt,\n bulkMemory,\n exceptions,\n extendedConst,\n gc,\n memory64,\n multiValue,\n mutableGlobals,\n relaxedSimd,\n saturatedFloatToInt,\n signExtensions,\n simd,\n streamingCompilation,\n tailCall,\n threads,\n} from 'wasm-feature-detect'\n\nexport const WasmFeatureDetectors = {\n bigInt: bigInt,\n bulkMemory: bulkMemory,\n exceptions: exceptions,\n extendedConst: extendedConst,\n gc: gc,\n memory64: memory64,\n multiValue: multiValue,\n mutableGlobals: mutableGlobals,\n referenceTypes: () => Promise<boolean>,\n relaxedSimd: relaxedSimd,\n saturatedFloatToInt: saturatedFloatToInt,\n signExtensions: signExtensions,\n simd: simd,\n streamingCompilation: streamingCompilation,\n tailCall: tailCall,\n threads: threads,\n} as const\n\nexport type WasmFeature = keyof typeof WasmFeatureDetectors\n\nexport class WasmSupport {\n private _allowWasm = true\n private _featureSupport: Partial<Record<WasmFeature, boolean>> = {}\n private _forceWasm = false\n private _isInitialized = false\n private _isWasmFeatureSetSupported = false\n\n /**\n * Instance constructor for use where async instantiation\n * is not possible. Where possible, prefer the static\n * create method over use of this constructor directly\n * as no initialization (feature detection) is able to\n * be done here\n * @param desiredFeatures The desired feature set\n */\n constructor(protected desiredFeatures: WasmFeature[]) {}\n\n /**\n * Is Wasm allowed\n */\n get allowWasm(): boolean {\n return this._allowWasm\n }\n /**\n * Whether or not to allow WASM usage\n */\n set allowWasm(v: boolean) {\n this._allowWasm = v\n }\n\n /**\n * Whether or not Wasm should be used based on the desired\n * feature set, initialization state, or force-use settings\n */\n get canUseWasm(): boolean {\n return (\n // Just force WASM\n this._forceWasm ||\n // Or if we haven't checked be optimistic\n (this._allowWasm && !this._isInitialized) ||\n // Or if we have checked and WASM is not supported, be realistic\n (this._allowWasm && this._isInitialized && this._isWasmFeatureSetSupported)\n )\n }\n\n /**\n * Returns a object containing a property for each desired wasm feature\n * with a boolean value indicating whether or not the feature is supported\n */\n get featureSupport(): Readonly<Partial<Record<WasmFeature, boolean>>> {\n return { ...this._featureSupport }\n }\n\n /**\n * Force use of Wasm\n */\n get forceWasm(): boolean {\n return this._forceWasm\n }\n /**\n * Whether or not to force Wasm usage\n */\n set forceWasm(v: boolean) {\n this._forceWasm = v\n }\n\n /**\n * Whether or not Wasm is supported based\n * on the desired feature set\n */\n get isDesiredFeatureSetSupported(): boolean {\n return this._isWasmFeatureSetSupported\n }\n\n /**\n * Whether or not Wasm detection has been run\n * for the desired feature set\n */\n get isInitialized(): boolean {\n return this._isInitialized\n }\n\n /**\n * Static creation & async initialization for use where\n * async instantiation is possible\n * @param desiredFeatures The desired feature set\n * @returns An initialized instance of the class with detection\n * for the desired feature set\n */\n static async create(desiredFeatures: WasmFeature[]): Promise<WasmSupport> {\n const instance = new WasmSupport(desiredFeatures)\n await instance.initialize()\n return instance\n }\n\n /**\n * Checks for specific wasm features\n * @param features The list of features to check for\n * @returns True if all the features are supported, false otherwise\n */\n async featureCheck(features: WasmFeature[]): Promise<boolean> {\n const results = await Promise.all(features.map((feature) => WasmFeatureDetectors[feature]).map(async (detector) => await detector()))\n return results.every(Boolean)\n }\n\n /**\n * Does feature detection for the desired feature set\n */\n async initialize(): Promise<void> {\n if (this._isInitialized) return\n await this.detectDesiredFeatures()\n this._isInitialized = true\n }\n\n protected async detectDesiredFeatures(): Promise<void> {\n for (let feature = 0; feature < this.desiredFeatures.length; feature++) {\n const desiredFeature = this.desiredFeatures[feature]\n const detector = WasmFeatureDetectors[desiredFeature]\n this._featureSupport[desiredFeature] = (await detector()) ? true : false\n }\n this._is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