@rfkit/spectrum-analyzer 0.1.49 → 0.1.50

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hxgh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -10,6 +10,8 @@
10
10
  pnpm add @rfkit/spectrum-analyzer
11
11
  ```
12
12
 
13
+ 正式版本默认走 `Release PR -> 合并 -> GitHub Actions 自动发布 npm`。仓库里的 `publish:npm` / `build:npm` 只保留为调试或应急入口,不作为日常正式发版流程。
14
+
13
15
  ## 使用
14
16
 
15
17
  ### JS 版本(默认)
@@ -97,6 +99,13 @@ pnpm build:wasm # 构建 WASM 版本
97
99
  pnpm build:all # 构建全部
98
100
  ```
99
101
 
102
+ ## 发版约定
103
+
104
+ - 发布级改动默认需要在 PR 中携带 `.changeset/*.md`
105
+ - `patch` / `minor` / `major` 由 changeset 决定,不要手改 `package.json.version`
106
+ - PR 合并到 `main` 后会自动创建或更新 Release PR;合并 Release PR 后才会正式发布 npm
107
+ - 若 GitHub Actions 在 `npm publish` 阶段报 `E404` 或权限类错误,先检查 npm 包设置里的 Trusted Publisher 是否精确匹配 `Hxgh/rfkit-spectrum-analyzer`、`release.yml`、`npm-release`,并确认 `package.json.repository.url` 仍是当前 GitHub 仓库;修配置后直接重跑当前未发布版本,不要继续 bump 版本
108
+
100
109
  ## License
101
110
 
102
111
  MIT
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@rfkit/spectrum-analyzer",
3
- "description": "A high-performance spectrum analyzer library for RF signal processing, supporting real-time spectrum analysis, waterfall display, and multi-segment frequency scanning",
3
+ "version": "0.1.50",
4
4
  "type": "module",
5
+ "description": "A high-performance spectrum analyzer library for RF signal processing, supporting real-time spectrum analysis, waterfall display, and multi-segment frequency scanning",
5
6
  "exports": {
6
7
  ".": {
7
8
  "types": "./index.d.ts",
@@ -16,8 +17,14 @@
16
17
  "types": "./index.d.ts",
17
18
  "author": "Hxgh",
18
19
  "license": "MIT",
19
- "version": "0.1.49",
20
- "private": false,
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/Hxgh/rfkit-spectrum-analyzer.git"
23
+ },
24
+ "homepage": "https://github.com/Hxgh/rfkit-spectrum-analyzer#readme",
25
+ "bugs": {
26
+ "url": "https://github.com/Hxgh/rfkit-spectrum-analyzer/issues"
27
+ },
21
28
  "keywords": [
22
29
  "spectrum-analyzer",
23
30
  "rf",
@@ -28,5 +35,10 @@
28
35
  "real-time",
29
36
  "antenna-factor",
30
37
  "frequency-scanning"
31
- ]
38
+ ],
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "packageManager": "pnpm@10.30.3",
43
+ "private": false
32
44
  }
@@ -1,2 +1,2 @@
1
1
  let wasm;function addToExternrefTable0(obj){const idx=wasm.__externref_table_alloc();wasm.__wbindgen_externrefs.set(idx,obj);return idx}function debugString(val){const type=typeof val;if("number"==type||"boolean"==type||null==val)return`${val}`;if("string"==type)return`"${val}"`;if("symbol"==type){const description=val.description;if(null==description)return"Symbol";return`Symbol(${description})`}if("function"==type){const name=val.name;if("string"==typeof name&&name.length>0)return`Function(${name})`;return"Function"}if(Array.isArray(val)){const length=val.length;let debug="[";if(length>0)debug+=debugString(val[0]);for(let i=1;i<length;i++)debug+=", "+debugString(val[i]);debug+="]";return debug}const builtInMatches=/\[object ([^\]]+)\]/.exec(toString.call(val));let className;if(!builtInMatches||!(builtInMatches.length>1))return toString.call(val);className=builtInMatches[1];if("Object"==className)try{return"Object("+JSON.stringify(val)+")"}catch(_){return"Object"}if(val instanceof Error)return`${val.name}: ${val.message}
2
- ${val.stack}`;return className}function getArrayF32FromWasm0(ptr,len){ptr>>>=0;return getFloat32ArrayMemory0().subarray(ptr/4,ptr/4+len)}function getArrayF64FromWasm0(ptr,len){ptr>>>=0;return getFloat64ArrayMemory0().subarray(ptr/8,ptr/8+len)}function getArrayJsValueFromWasm0(ptr,len){ptr>>>=0;const mem=getDataViewMemory0();const result=[];for(let i=ptr;i<ptr+4*len;i+=4)result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i,true)));wasm.__externref_drop_slice(ptr,len);return result}function getArrayU32FromWasm0(ptr,len){ptr>>>=0;return getUint32ArrayMemory0().subarray(ptr/4,ptr/4+len)}function getArrayU8FromWasm0(ptr,len){ptr>>>=0;return getUint8ArrayMemory0().subarray(ptr/1,ptr/1+len)}let cachedDataViewMemory0=null;function getDataViewMemory0(){if(null===cachedDataViewMemory0||true===cachedDataViewMemory0.buffer.detached||void 0===cachedDataViewMemory0.buffer.detached&&cachedDataViewMemory0.buffer!==wasm.memory.buffer)cachedDataViewMemory0=new DataView(wasm.memory.buffer);return cachedDataViewMemory0}let cachedFloat32ArrayMemory0=null;function getFloat32ArrayMemory0(){if(null===cachedFloat32ArrayMemory0||0===cachedFloat32ArrayMemory0.byteLength)cachedFloat32ArrayMemory0=new Float32Array(wasm.memory.buffer);return cachedFloat32ArrayMemory0}let cachedFloat64ArrayMemory0=null;function getFloat64ArrayMemory0(){if(null===cachedFloat64ArrayMemory0||0===cachedFloat64ArrayMemory0.byteLength)cachedFloat64ArrayMemory0=new Float64Array(wasm.memory.buffer);return cachedFloat64ArrayMemory0}function getStringFromWasm0(ptr,len){ptr>>>=0;return decodeText(ptr,len)}let cachedUint32ArrayMemory0=null;function getUint32ArrayMemory0(){if(null===cachedUint32ArrayMemory0||0===cachedUint32ArrayMemory0.byteLength)cachedUint32ArrayMemory0=new Uint32Array(wasm.memory.buffer);return cachedUint32ArrayMemory0}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){if(null===cachedUint8ArrayMemory0||0===cachedUint8ArrayMemory0.byteLength)cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer);return cachedUint8ArrayMemory0}function handleError(f,args){try{return f.apply(this,args)}catch(e){const idx=addToExternrefTable0(e);wasm.__wbindgen_exn_store(idx)}}function isLikeNone(x){return null==x}function passStringToWasm0(arg,malloc,realloc){if(void 0===realloc){const buf=cachedTextEncoder.encode(arg);const ptr=malloc(buf.length,1)>>>0;getUint8ArrayMemory0().subarray(ptr,ptr+buf.length).set(buf);WASM_VECTOR_LEN=buf.length;return ptr}let len=arg.length;let ptr=malloc(len,1)>>>0;const mem=getUint8ArrayMemory0();let offset=0;for(;offset<len;offset++){const code=arg.charCodeAt(offset);if(code>127)break;mem[ptr+offset]=code}if(offset!==len){if(0!==offset)arg=arg.slice(offset);ptr=realloc(ptr,len,len=offset+3*arg.length,1)>>>0;const view=getUint8ArrayMemory0().subarray(ptr+offset,ptr+len);const ret=cachedTextEncoder.encodeInto(arg,view);offset+=ret.written;ptr=realloc(ptr,len,offset,1)>>>0}WASM_VECTOR_LEN=offset;return ptr}function takeFromExternrefTable0(idx){const value=wasm.__wbindgen_externrefs.get(idx);wasm.__externref_table_dealloc(idx);return value}let cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});cachedTextDecoder.decode();const MAX_SAFARI_DECODE_BYTES=0x7ff00000;let numBytesDecoded=0;function decodeText(ptr,len){numBytesDecoded+=len;if(numBytesDecoded>=MAX_SAFARI_DECODE_BYTES){cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});cachedTextDecoder.decode();numBytesDecoded=len}return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr,ptr+len))}const cachedTextEncoder=new TextEncoder;if(!("encodeInto"in cachedTextEncoder))cachedTextEncoder.encodeInto=function(arg,view){const buf=cachedTextEncoder.encode(arg);view.set(buf);return{read:arg.length,written:buf.length}};let WASM_VECTOR_LEN=0;const WasmLevelStreamAnalyzerFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_wasmlevelstreamanalyzer_free(ptr>>>0,1));const WasmSpectrumAnalyzerFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_wasmspectrumanalyzer_free(ptr>>>0,1));export class WasmLevelStreamAnalyzer{__destroy_into_raw(){const ptr=this.__wbg_ptr;this.__wbg_ptr=0;WasmLevelStreamAnalyzerFinalization.unregister(this);return ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_wasmlevelstreamanalyzer_free(ptr,0)}constructor(config_js){const ret=wasm.wasmlevelstreamanalyzer_new(config_js);if(ret[2])throw takeFromExternrefTable0(ret[1]);this.__wbg_ptr=ret[0]>>>0;WasmLevelStreamAnalyzerFinalization.register(this,this.__wbg_ptr,this);return this}reset(){wasm.wasmlevelstreamanalyzer_reset(this.__wbg_ptr)}set_config(config_js){const ret=wasm.wasmlevelstreamanalyzer_set_config(this.__wbg_ptr,config_js);if(ret[1])throw takeFromExternrefTable0(ret[0])}set_callback(callback){wasm.wasmlevelstreamanalyzer_set_callback(this.__wbg_ptr,callback)}process(level,timestamp){wasm.wasmlevelstreamanalyzer_process(this.__wbg_ptr,level,timestamp)}get_all(){const ret=wasm.wasmlevelstreamanalyzer_get_all(this.__wbg_ptr);return ret}}if(Symbol.dispose)WasmLevelStreamAnalyzer.prototype[Symbol.dispose]=WasmLevelStreamAnalyzer.prototype.free;export class WasmSpectrumAnalyzer{__destroy_into_raw(){const ptr=this.__wbg_ptr;this.__wbg_ptr=0;WasmSpectrumAnalyzerFinalization.unregister(this);return ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_wasmspectrumanalyzer_free(ptr,0)}constructor(config_js){const ret=wasm.wasmspectrumanalyzer_new(config_js);if(ret[2])throw takeFromExternrefTable0(ret[1]);this.__wbg_ptr=ret[0]>>>0;WasmSpectrumAnalyzerFinalization.register(this,this.__wbg_ptr,this);return this}process(data,timestamp,segment_offset,offset){const ptr0=passStringToWasm0(timestamp,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.wasmspectrumanalyzer_process(this.__wbg_ptr,data,ptr0,len0,segment_offset,offset);if(ret[1])throw takeFromExternrefTable0(ret[0])}initialize_segments(segments_js){const ret=wasm.wasmspectrumanalyzer_initialize_segments(this.__wbg_ptr,segments_js);if(ret[1])throw takeFromExternrefTable0(ret[0])}update_sampling_range(start,end){const ret=wasm.wasmspectrumanalyzer_update_sampling_range(this.__wbg_ptr,start,end);return ret}reset(preserve_processed_flag){wasm.wasmspectrumanalyzer_reset(this.__wbg_ptr,preserve_processed_flag)}set_callback(callback){wasm.wasmspectrumanalyzer_set_callback(this.__wbg_ptr,callback)}set_antenna_factor(data){wasm.wasmspectrumanalyzer_set_antenna_factor(this.__wbg_ptr,data)}set_antenna_factor_switch(new_switch){wasm.wasmspectrumanalyzer_set_antenna_factor_switch(this.__wbg_ptr,new_switch)}update_processing(options){const ret=wasm.wasmspectrumanalyzer_update_processing(this.__wbg_ptr,options);if(ret[1])throw takeFromExternrefTable0(ret[0])}set_template_data(data,tolerance){wasm.wasmspectrumanalyzer_set_template_data(this.__wbg_ptr,isLikeNone(data)?0:addToExternrefTable0(data),isLikeNone(tolerance)?0x100000001:Math.fround(tolerance))}set_occupancy_data(data){wasm.wasmspectrumanalyzer_set_occupancy_data(this.__wbg_ptr,isLikeNone(data)?0:addToExternrefTable0(data))}set_background_noise_data(data){wasm.wasmspectrumanalyzer_set_background_noise_data(this.__wbg_ptr,isLikeNone(data)?0:addToExternrefTable0(data))}set_real_data(data,timestamp){const ptr0=passStringToWasm0(timestamp,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;wasm.wasmspectrumanalyzer_set_real_data(this.__wbg_ptr,data,ptr0,len0)}set_max_data(data){wasm.wasmspectrumanalyzer_set_max_data(this.__wbg_ptr,data)}set_min_data(data){wasm.wasmspectrumanalyzer_set_min_data(this.__wbg_ptr,data)}set_avg_data(data){wasm.wasmspectrumanalyzer_set_avg_data(this.__wbg_ptr,data)}set_extra_data(data,mode){var ptr0=isLikeNone(mode)?0:passStringToWasm0(mode,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);var len0=WASM_VECTOR_LEN;const ret=wasm.wasmspectrumanalyzer_set_extra_data(this.__wbg_ptr,data,ptr0,len0);if(ret[1])throw takeFromExternrefTable0(ret[0])}set_waterfall_data(frames_js){const ret=wasm.wasmspectrumanalyzer_set_waterfall_data(this.__wbg_ptr,frames_js);if(ret[1])throw takeFromExternrefTable0(ret[0])}get_all_raw_data(left){const ret=wasm.wasmspectrumanalyzer_get_all_raw_data(this.__wbg_ptr,!isLikeNone(left),isLikeNone(left)?0:left);if(ret[2])throw takeFromExternrefTable0(ret[1]);return takeFromExternrefTable0(ret[0])}get_antenna_factor_view(){const ret=wasm.wasmspectrumanalyzer_get_antenna_factor_view(this.__wbg_ptr);return ret}get_src_index_cache_view(){const ret=wasm.wasmspectrumanalyzer_get_src_index_cache_view(this.__wbg_ptr);return ret}get_config(){const ret=wasm.wasmspectrumanalyzer_get_config(this.__wbg_ptr);return ret}get_performance_metrics(){const ret=wasm.wasmspectrumanalyzer_get_performance_metrics(this.__wbg_ptr);return ret}get_extra_data_keys(){const ret=wasm.wasmspectrumanalyzer_get_extra_data_keys(this.__wbg_ptr);var v1=getArrayJsValueFromWasm0(ret[0],ret[1]).slice();wasm.__wbindgen_free(ret[0],4*ret[1],4);return v1}get_extra_data_view(key){const ptr0=passStringToWasm0(key,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.wasmspectrumanalyzer_get_extra_data_view(this.__wbg_ptr,ptr0,len0);return ret}}if(Symbol.dispose)WasmSpectrumAnalyzer.prototype[Symbol.dispose]=WasmSpectrumAnalyzer.prototype.free;export function init(){wasm.init()}const EXPECTED_RESPONSE_TYPES=new Set(["basic","cors","default"]);async function __wbg_load(module,imports){if("function"==typeof Response&&module instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){const validResponse=module.ok&&EXPECTED_RESPONSE_TYPES.has(module.type);if(validResponse&&"application/wasm"!==module.headers.get("Content-Type"))console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e);else throw e}const bytes=await module.arrayBuffer();return await WebAssembly.instantiate(bytes,imports)}{const instance=await WebAssembly.instantiate(module,imports);if(instance instanceof WebAssembly.Instance)return{instance,module};return instance}}function __wbg_get_imports(){const imports={};imports.wbg={};imports.wbg.__wbg_Error_52673b7de5a0ca89=function(arg0,arg1){const ret=Error(getStringFromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_Number_2d1dcfcf4ec51736=function(arg0){const ret=Number(arg0);return ret};imports.wbg.__wbg_String_8f0eb39a4a4c2f66=function(arg0,arg1){const ret=String(arg1);const ptr1=passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(arg0,arg1){const v=arg1;const ret="bigint"==typeof v?v:void 0;getDataViewMemory0().setBigInt64(arg0+8,isLikeNone(ret)?BigInt(0):ret,true);getDataViewMemory0().setInt32(arg0+0,!isLikeNone(ret),true)};imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(arg0){const v=arg0;const ret="boolean"==typeof v?v:void 0;return isLikeNone(ret)?0xffffff:ret?1:0};imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(arg0,arg1){const ret=debugString(arg1);const ptr1=passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(arg0,arg1){const ret=arg0 in arg1;return ret};imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(arg0){const ret="bigint"==typeof arg0;return ret};imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(arg0){const ret="function"==typeof arg0;return ret};imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5=function(arg0){const ret=null===arg0;return ret};imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(arg0){const val=arg0;const ret="object"==typeof val&&null!==val;return ret};imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(arg0){const ret=void 0===arg0;return ret};imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(arg0,arg1){const ret=arg0===arg1;return ret};imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(arg0,arg1){const ret=arg0==arg1;return ret};imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(arg0,arg1){const obj=arg1;const ret="number"==typeof obj?obj:void 0;getDataViewMemory0().setFloat64(arg0+8,isLikeNone(ret)?0:ret,true);getDataViewMemory0().setInt32(arg0+0,!isLikeNone(ret),true)};imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(arg0,arg1){const obj=arg1;const ret="string"==typeof obj?obj:void 0;var ptr1=isLikeNone(ret)?0:passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);var len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(arg0,arg1){throw new Error(getStringFromWasm0(arg0,arg1))};imports.wbg.__wbg_call_3020136f7a2d6e44=function(){return handleError(function(arg0,arg1,arg2){const ret=arg0.call(arg1,arg2);return ret},arguments)};imports.wbg.__wbg_call_abb4ff46ce38be40=function(){return handleError(function(arg0,arg1){const ret=arg0.call(arg1);return ret},arguments)};imports.wbg.__wbg_done_62ea16af4ce34b24=function(arg0){const ret=arg0.done;return ret};imports.wbg.__wbg_error_7534b8e9a36f1ab4=function(arg0,arg1){let deferred0_0;let deferred0_1;try{deferred0_0=arg0;deferred0_1=arg1;console.error(getStringFromWasm0(arg0,arg1))}finally{wasm.__wbindgen_free(deferred0_0,deferred0_1,1)}};imports.wbg.__wbg_from_29a8414a7a7cd19d=function(arg0){const ret=Array.from(arg0);return ret};imports.wbg.__wbg_get_6b7bd52aca3f9671=function(arg0,arg1){const ret=arg0[arg1>>>0];return ret};imports.wbg.__wbg_get_af9dab7e9603ea93=function(){return handleError(function(arg0,arg1){const ret=Reflect.get(arg0,arg1);return ret},arguments)};imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(arg0,arg1){const ret=arg0[arg1];return ret};imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(arg0){let result;try{result=arg0 instanceof ArrayBuffer}catch(_){result=false}const ret=result;return ret};imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(arg0){let result;try{result=arg0 instanceof Uint8Array}catch(_){result=false}const ret=result;return ret};imports.wbg.__wbg_isArray_51fd9e6422c0a395=function(arg0){const ret=Array.isArray(arg0);return ret};imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(arg0){const ret=Number.isSafeInteger(arg0);return ret};imports.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){const ret=Symbol.iterator;return ret};imports.wbg.__wbg_keys_f5c6002ff150fc6c=function(arg0){const ret=Object.keys(arg0);return ret};imports.wbg.__wbg_length_22ac23eaec9d8053=function(arg0){const ret=arg0.length;return ret};imports.wbg.__wbg_length_86ce4877baf913bb=function(arg0){const ret=arg0.length;return ret};imports.wbg.__wbg_length_d45040a40c570362=function(arg0){const ret=arg0.length;return ret};imports.wbg.__wbg_new_1ba21ce319a06297=function(){const ret=new Object;return ret};imports.wbg.__wbg_new_25f239778d6112b9=function(){const ret=new Array;return ret};imports.wbg.__wbg_new_354204b1383f9085=function(arg0){const ret=new Float32Array(arg0);return ret};imports.wbg.__wbg_new_6421f6084cc5bc5a=function(arg0){const ret=new Uint8Array(arg0);return ret};imports.wbg.__wbg_new_8a6f238a6ece86ea=function(){const ret=new Error;return ret};imports.wbg.__wbg_new_b546ae120718850e=function(){const ret=new Map;return ret};imports.wbg.__wbg_new_from_slice_41e2764a343e3cb1=function(arg0,arg1){const ret=new Float32Array(getArrayF32FromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_new_from_slice_9a48ef80d2a51f94=function(arg0,arg1){const ret=new Float64Array(getArrayF64FromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_new_from_slice_db0691b69e9d3891=function(arg0,arg1){const ret=new Uint32Array(getArrayU32FromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_next_138a17bbf04e926c=function(arg0){const ret=arg0.next;return ret};imports.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return handleError(function(arg0){const ret=arg0.next();return ret},arguments)};imports.wbg.__wbg_now_69d776cd24f5215b=function(){const ret=Date.now();return ret};imports.wbg.__wbg_prototypesetcall_96cc7097487b926d=function(arg0,arg1,arg2){Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0,arg1),arg2)};imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(arg0,arg1,arg2){Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0,arg1),arg2)};imports.wbg.__wbg_push_7d9be8f38fc13975=function(arg0,arg1){const ret=arg0.push(arg1);return ret};imports.wbg.__wbg_set_3f1d0b984ed272ed=function(arg0,arg1,arg2){arg0[arg1]=arg2};imports.wbg.__wbg_set_781438a03c0c3c81=function(){return handleError(function(arg0,arg1,arg2){const ret=Reflect.set(arg0,arg1,arg2);return ret},arguments)};imports.wbg.__wbg_set_7df433eea03a5c14=function(arg0,arg1,arg2){arg0[arg1>>>0]=arg2};imports.wbg.__wbg_set_efaaf145b9377369=function(arg0,arg1,arg2){const ret=arg0.set(arg1,arg2);return ret};imports.wbg.__wbg_stack_0ed75d68575b0f3c=function(arg0,arg1){const ret=arg1.stack;const ptr1=passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg_value_57b7b035e117f7ee=function(arg0){const ret=arg0.value;return ret};imports.wbg.__wbindgen_cast_2241b6af4c4b2941=function(arg0,arg1){const ret=getStringFromWasm0(arg0,arg1);return ret};imports.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(arg0){const ret=BigInt.asUintN(64,arg0);return ret};imports.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(arg0){const ret=arg0;return ret};imports.wbg.__wbindgen_init_externref_table=function(){const table=wasm.__wbindgen_externrefs;const offset=table.grow(4);table.set(0,void 0);table.set(offset+0,void 0);table.set(offset+1,null);table.set(offset+2,true);table.set(offset+3,false)};return imports}function __wbg_finalize_init(instance,module){wasm=instance.exports;__wbg_init.__wbindgen_wasm_module=module;cachedDataViewMemory0=null;cachedFloat32ArrayMemory0=null;cachedFloat64ArrayMemory0=null;cachedUint32ArrayMemory0=null;cachedUint8ArrayMemory0=null;wasm.__wbindgen_start();return wasm}function initSync(module){if(void 0!==wasm)return wasm;if(void 0!==module){if(Object.getPrototypeOf(module)===Object.prototype)({module}=module);else console.warn("using deprecated parameters for `initSync()`; pass a single object instead")}const imports=__wbg_get_imports();if(!(module instanceof WebAssembly.Module))module=new WebAssembly.Module(module);const instance=new WebAssembly.Instance(module,imports);return __wbg_finalize_init(instance,module)}async function __wbg_init(module_or_path){if(void 0!==wasm)return wasm;if(void 0!==module_or_path){if(Object.getPrototypeOf(module_or_path)===Object.prototype)({module_or_path}=module_or_path);else console.warn("using deprecated parameters for the initialization function; pass a single object instead")}if(void 0===module_or_path)module_or_path=new URL("rfkit_spectrum_analyzer_wasm_bg.wasm",import.meta.url);const imports=__wbg_get_imports();if("string"==typeof module_or_path||"function"==typeof Request&&module_or_path instanceof Request||"function"==typeof URL&&module_or_path instanceof URL)module_or_path=fetch(module_or_path);const{instance,module}=await __wbg_load(await module_or_path,imports);return __wbg_finalize_init(instance,module)}export default __wbg_init;export{initSync};
2
+ ${val.stack}`;return className}function getArrayF32FromWasm0(ptr,len){ptr>>>=0;return getFloat32ArrayMemory0().subarray(ptr/4,ptr/4+len)}function getArrayF64FromWasm0(ptr,len){ptr>>>=0;return getFloat64ArrayMemory0().subarray(ptr/8,ptr/8+len)}function getArrayJsValueFromWasm0(ptr,len){ptr>>>=0;const mem=getDataViewMemory0();const result=[];for(let i=ptr;i<ptr+4*len;i+=4)result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i,true)));wasm.__externref_drop_slice(ptr,len);return result}function getArrayU32FromWasm0(ptr,len){ptr>>>=0;return getUint32ArrayMemory0().subarray(ptr/4,ptr/4+len)}function getArrayU8FromWasm0(ptr,len){ptr>>>=0;return getUint8ArrayMemory0().subarray(ptr/1,ptr/1+len)}let cachedDataViewMemory0=null;function getDataViewMemory0(){if(null===cachedDataViewMemory0||true===cachedDataViewMemory0.buffer.detached||void 0===cachedDataViewMemory0.buffer.detached&&cachedDataViewMemory0.buffer!==wasm.memory.buffer)cachedDataViewMemory0=new DataView(wasm.memory.buffer);return cachedDataViewMemory0}let cachedFloat32ArrayMemory0=null;function getFloat32ArrayMemory0(){if(null===cachedFloat32ArrayMemory0||0===cachedFloat32ArrayMemory0.byteLength)cachedFloat32ArrayMemory0=new Float32Array(wasm.memory.buffer);return cachedFloat32ArrayMemory0}let cachedFloat64ArrayMemory0=null;function getFloat64ArrayMemory0(){if(null===cachedFloat64ArrayMemory0||0===cachedFloat64ArrayMemory0.byteLength)cachedFloat64ArrayMemory0=new Float64Array(wasm.memory.buffer);return cachedFloat64ArrayMemory0}function getStringFromWasm0(ptr,len){ptr>>>=0;return decodeText(ptr,len)}let cachedUint32ArrayMemory0=null;function getUint32ArrayMemory0(){if(null===cachedUint32ArrayMemory0||0===cachedUint32ArrayMemory0.byteLength)cachedUint32ArrayMemory0=new Uint32Array(wasm.memory.buffer);return cachedUint32ArrayMemory0}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){if(null===cachedUint8ArrayMemory0||0===cachedUint8ArrayMemory0.byteLength)cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer);return cachedUint8ArrayMemory0}function handleError(f,args){try{return f.apply(this,args)}catch(e){const idx=addToExternrefTable0(e);wasm.__wbindgen_exn_store(idx)}}function isLikeNone(x){return null==x}function passStringToWasm0(arg,malloc,realloc){if(void 0===realloc){const buf=cachedTextEncoder.encode(arg);const ptr=malloc(buf.length,1)>>>0;getUint8ArrayMemory0().subarray(ptr,ptr+buf.length).set(buf);WASM_VECTOR_LEN=buf.length;return ptr}let len=arg.length;let ptr=malloc(len,1)>>>0;const mem=getUint8ArrayMemory0();let offset=0;for(;offset<len;offset++){const code=arg.charCodeAt(offset);if(code>127)break;mem[ptr+offset]=code}if(offset!==len){if(0!==offset)arg=arg.slice(offset);ptr=realloc(ptr,len,len=offset+3*arg.length,1)>>>0;const view=getUint8ArrayMemory0().subarray(ptr+offset,ptr+len);const ret=cachedTextEncoder.encodeInto(arg,view);offset+=ret.written;ptr=realloc(ptr,len,offset,1)>>>0}WASM_VECTOR_LEN=offset;return ptr}function takeFromExternrefTable0(idx){const value=wasm.__wbindgen_externrefs.get(idx);wasm.__externref_table_dealloc(idx);return value}let cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});cachedTextDecoder.decode();const MAX_SAFARI_DECODE_BYTES=0x7ff00000;let numBytesDecoded=0;function decodeText(ptr,len){numBytesDecoded+=len;if(numBytesDecoded>=MAX_SAFARI_DECODE_BYTES){cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});cachedTextDecoder.decode();numBytesDecoded=len}return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr,ptr+len))}const cachedTextEncoder=new TextEncoder;if(!("encodeInto"in cachedTextEncoder))cachedTextEncoder.encodeInto=function(arg,view){const buf=cachedTextEncoder.encode(arg);view.set(buf);return{read:arg.length,written:buf.length}};let WASM_VECTOR_LEN=0;const WasmLevelStreamAnalyzerFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_wasmlevelstreamanalyzer_free(ptr>>>0,1));const WasmSpectrumAnalyzerFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(ptr=>wasm.__wbg_wasmspectrumanalyzer_free(ptr>>>0,1));export class WasmLevelStreamAnalyzer{__destroy_into_raw(){const ptr=this.__wbg_ptr;this.__wbg_ptr=0;WasmLevelStreamAnalyzerFinalization.unregister(this);return ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_wasmlevelstreamanalyzer_free(ptr,0)}set_config(config_js){const ret=wasm.wasmlevelstreamanalyzer_set_config(this.__wbg_ptr,config_js);if(ret[1])throw takeFromExternrefTable0(ret[0])}set_callback(callback){wasm.wasmlevelstreamanalyzer_set_callback(this.__wbg_ptr,callback)}constructor(config_js){const ret=wasm.wasmlevelstreamanalyzer_new(config_js);if(ret[2])throw takeFromExternrefTable0(ret[1]);this.__wbg_ptr=ret[0]>>>0;WasmLevelStreamAnalyzerFinalization.register(this,this.__wbg_ptr,this);return this}reset(){wasm.wasmlevelstreamanalyzer_reset(this.__wbg_ptr)}get_all(){const ret=wasm.wasmlevelstreamanalyzer_get_all(this.__wbg_ptr);return ret}process(level,timestamp){wasm.wasmlevelstreamanalyzer_process(this.__wbg_ptr,level,timestamp)}}if(Symbol.dispose)WasmLevelStreamAnalyzer.prototype[Symbol.dispose]=WasmLevelStreamAnalyzer.prototype.free;export class WasmSpectrumAnalyzer{__destroy_into_raw(){const ptr=this.__wbg_ptr;this.__wbg_ptr=0;WasmSpectrumAnalyzerFinalization.unregister(this);return ptr}free(){const ptr=this.__destroy_into_raw();wasm.__wbg_wasmspectrumanalyzer_free(ptr,0)}get_config(){const ret=wasm.wasmspectrumanalyzer_get_config(this.__wbg_ptr);return ret}set_avg_data(data){wasm.wasmspectrumanalyzer_set_avg_data(this.__wbg_ptr,data)}set_callback(callback){wasm.wasmspectrumanalyzer_set_callback(this.__wbg_ptr,callback)}set_max_data(data){wasm.wasmspectrumanalyzer_set_max_data(this.__wbg_ptr,data)}set_min_data(data){wasm.wasmspectrumanalyzer_set_min_data(this.__wbg_ptr,data)}set_real_data(data,timestamp){const ptr0=passStringToWasm0(timestamp,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;wasm.wasmspectrumanalyzer_set_real_data(this.__wbg_ptr,data,ptr0,len0)}set_extra_data(data,mode){var ptr0=isLikeNone(mode)?0:passStringToWasm0(mode,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);var len0=WASM_VECTOR_LEN;const ret=wasm.wasmspectrumanalyzer_set_extra_data(this.__wbg_ptr,data,ptr0,len0);if(ret[1])throw takeFromExternrefTable0(ret[0])}get_all_raw_data(left){const ret=wasm.wasmspectrumanalyzer_get_all_raw_data(this.__wbg_ptr,!isLikeNone(left),isLikeNone(left)?0:left);if(ret[2])throw takeFromExternrefTable0(ret[1]);return takeFromExternrefTable0(ret[0])}set_template_data(data,tolerance){wasm.wasmspectrumanalyzer_set_template_data(this.__wbg_ptr,isLikeNone(data)?0:addToExternrefTable0(data),isLikeNone(tolerance)?0x100000001:Math.fround(tolerance))}update_processing(options){const ret=wasm.wasmspectrumanalyzer_update_processing(this.__wbg_ptr,options);if(ret[1])throw takeFromExternrefTable0(ret[0])}set_antenna_factor(data){wasm.wasmspectrumanalyzer_set_antenna_factor(this.__wbg_ptr,data)}set_occupancy_data(data){wasm.wasmspectrumanalyzer_set_occupancy_data(this.__wbg_ptr,isLikeNone(data)?0:addToExternrefTable0(data))}set_waterfall_data(frames_js){const ret=wasm.wasmspectrumanalyzer_set_waterfall_data(this.__wbg_ptr,frames_js);if(ret[1])throw takeFromExternrefTable0(ret[0])}get_extra_data_keys(){const ret=wasm.wasmspectrumanalyzer_get_extra_data_keys(this.__wbg_ptr);var v1=getArrayJsValueFromWasm0(ret[0],ret[1]).slice();wasm.__wbindgen_free(ret[0],4*ret[1],4);return v1}get_extra_data_view(key){const ptr0=passStringToWasm0(key,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.wasmspectrumanalyzer_get_extra_data_view(this.__wbg_ptr,ptr0,len0);return ret}initialize_segments(segments_js){const ret=wasm.wasmspectrumanalyzer_initialize_segments(this.__wbg_ptr,segments_js);if(ret[1])throw takeFromExternrefTable0(ret[0])}update_sampling_range(start,end){const ret=wasm.wasmspectrumanalyzer_update_sampling_range(this.__wbg_ptr,start,end);return ret}get_antenna_factor_view(){const ret=wasm.wasmspectrumanalyzer_get_antenna_factor_view(this.__wbg_ptr);return ret}get_performance_metrics(){const ret=wasm.wasmspectrumanalyzer_get_performance_metrics(this.__wbg_ptr);return ret}get_src_index_cache_view(){const ret=wasm.wasmspectrumanalyzer_get_src_index_cache_view(this.__wbg_ptr);return ret}set_antenna_factor_switch(new_switch){wasm.wasmspectrumanalyzer_set_antenna_factor_switch(this.__wbg_ptr,new_switch)}set_background_noise_data(data){wasm.wasmspectrumanalyzer_set_background_noise_data(this.__wbg_ptr,isLikeNone(data)?0:addToExternrefTable0(data))}constructor(config_js){const ret=wasm.wasmspectrumanalyzer_new(config_js);if(ret[2])throw takeFromExternrefTable0(ret[1]);this.__wbg_ptr=ret[0]>>>0;WasmSpectrumAnalyzerFinalization.register(this,this.__wbg_ptr,this);return this}reset(preserve_processed_flag){wasm.wasmspectrumanalyzer_reset(this.__wbg_ptr,preserve_processed_flag)}process(data,timestamp,segment_offset,offset){const ptr0=passStringToWasm0(timestamp,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.wasmspectrumanalyzer_process(this.__wbg_ptr,data,ptr0,len0,segment_offset,offset);if(ret[1])throw takeFromExternrefTable0(ret[0])}}if(Symbol.dispose)WasmSpectrumAnalyzer.prototype[Symbol.dispose]=WasmSpectrumAnalyzer.prototype.free;export function init(){wasm.init()}const EXPECTED_RESPONSE_TYPES=new Set(["basic","cors","default"]);async function __wbg_load(module,imports){if("function"==typeof Response&&module instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){const validResponse=module.ok&&EXPECTED_RESPONSE_TYPES.has(module.type);if(validResponse&&"application/wasm"!==module.headers.get("Content-Type"))console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e);else throw e}const bytes=await module.arrayBuffer();return await WebAssembly.instantiate(bytes,imports)}{const instance=await WebAssembly.instantiate(module,imports);if(instance instanceof WebAssembly.Instance)return{instance,module};return instance}}function __wbg_get_imports(){const imports={};imports.wbg={};imports.wbg.__wbg_Error_52673b7de5a0ca89=function(arg0,arg1){const ret=Error(getStringFromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_Number_2d1dcfcf4ec51736=function(arg0){const ret=Number(arg0);return ret};imports.wbg.__wbg_String_8f0eb39a4a4c2f66=function(arg0,arg1){const ret=String(arg1);const ptr1=passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(arg0,arg1){const v=arg1;const ret="bigint"==typeof v?v:void 0;getDataViewMemory0().setBigInt64(arg0+8,isLikeNone(ret)?BigInt(0):ret,true);getDataViewMemory0().setInt32(arg0+0,!isLikeNone(ret),true)};imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(arg0){const v=arg0;const ret="boolean"==typeof v?v:void 0;return isLikeNone(ret)?0xffffff:ret?1:0};imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(arg0,arg1){const ret=debugString(arg1);const ptr1=passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(arg0,arg1){const ret=arg0 in arg1;return ret};imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(arg0){const ret="bigint"==typeof arg0;return ret};imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(arg0){const ret="function"==typeof arg0;return ret};imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5=function(arg0){const ret=null===arg0;return ret};imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(arg0){const val=arg0;const ret="object"==typeof val&&null!==val;return ret};imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(arg0){const ret=void 0===arg0;return ret};imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(arg0,arg1){const ret=arg0===arg1;return ret};imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(arg0,arg1){const ret=arg0==arg1;return ret};imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(arg0,arg1){const obj=arg1;const ret="number"==typeof obj?obj:void 0;getDataViewMemory0().setFloat64(arg0+8,isLikeNone(ret)?0:ret,true);getDataViewMemory0().setInt32(arg0+0,!isLikeNone(ret),true)};imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(arg0,arg1){const obj=arg1;const ret="string"==typeof obj?obj:void 0;var ptr1=isLikeNone(ret)?0:passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);var len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(arg0,arg1){throw new Error(getStringFromWasm0(arg0,arg1))};imports.wbg.__wbg_call_3020136f7a2d6e44=function(){return handleError(function(arg0,arg1,arg2){const ret=arg0.call(arg1,arg2);return ret},arguments)};imports.wbg.__wbg_call_abb4ff46ce38be40=function(){return handleError(function(arg0,arg1){const ret=arg0.call(arg1);return ret},arguments)};imports.wbg.__wbg_done_62ea16af4ce34b24=function(arg0){const ret=arg0.done;return ret};imports.wbg.__wbg_error_7534b8e9a36f1ab4=function(arg0,arg1){let deferred0_0;let deferred0_1;try{deferred0_0=arg0;deferred0_1=arg1;console.error(getStringFromWasm0(arg0,arg1))}finally{wasm.__wbindgen_free(deferred0_0,deferred0_1,1)}};imports.wbg.__wbg_from_29a8414a7a7cd19d=function(arg0){const ret=Array.from(arg0);return ret};imports.wbg.__wbg_get_6b7bd52aca3f9671=function(arg0,arg1){const ret=arg0[arg1>>>0];return ret};imports.wbg.__wbg_get_af9dab7e9603ea93=function(){return handleError(function(arg0,arg1){const ret=Reflect.get(arg0,arg1);return ret},arguments)};imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(arg0,arg1){const ret=arg0[arg1];return ret};imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(arg0){let result;try{result=arg0 instanceof ArrayBuffer}catch(_){result=false}const ret=result;return ret};imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(arg0){let result;try{result=arg0 instanceof Uint8Array}catch(_){result=false}const ret=result;return ret};imports.wbg.__wbg_isArray_51fd9e6422c0a395=function(arg0){const ret=Array.isArray(arg0);return ret};imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(arg0){const ret=Number.isSafeInteger(arg0);return ret};imports.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){const ret=Symbol.iterator;return ret};imports.wbg.__wbg_keys_f5c6002ff150fc6c=function(arg0){const ret=Object.keys(arg0);return ret};imports.wbg.__wbg_length_22ac23eaec9d8053=function(arg0){const ret=arg0.length;return ret};imports.wbg.__wbg_length_86ce4877baf913bb=function(arg0){const ret=arg0.length;return ret};imports.wbg.__wbg_length_d45040a40c570362=function(arg0){const ret=arg0.length;return ret};imports.wbg.__wbg_new_1ba21ce319a06297=function(){const ret=new Object;return ret};imports.wbg.__wbg_new_25f239778d6112b9=function(){const ret=new Array;return ret};imports.wbg.__wbg_new_354204b1383f9085=function(arg0){const ret=new Float32Array(arg0);return ret};imports.wbg.__wbg_new_6421f6084cc5bc5a=function(arg0){const ret=new Uint8Array(arg0);return ret};imports.wbg.__wbg_new_8a6f238a6ece86ea=function(){const ret=new Error;return ret};imports.wbg.__wbg_new_b546ae120718850e=function(){const ret=new Map;return ret};imports.wbg.__wbg_new_from_slice_41e2764a343e3cb1=function(arg0,arg1){const ret=new Float32Array(getArrayF32FromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_new_from_slice_9a48ef80d2a51f94=function(arg0,arg1){const ret=new Float64Array(getArrayF64FromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_new_from_slice_db0691b69e9d3891=function(arg0,arg1){const ret=new Uint32Array(getArrayU32FromWasm0(arg0,arg1));return ret};imports.wbg.__wbg_next_138a17bbf04e926c=function(arg0){const ret=arg0.next;return ret};imports.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return handleError(function(arg0){const ret=arg0.next();return ret},arguments)};imports.wbg.__wbg_now_69d776cd24f5215b=function(){const ret=Date.now();return ret};imports.wbg.__wbg_prototypesetcall_96cc7097487b926d=function(arg0,arg1,arg2){Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0,arg1),arg2)};imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(arg0,arg1,arg2){Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0,arg1),arg2)};imports.wbg.__wbg_push_7d9be8f38fc13975=function(arg0,arg1){const ret=arg0.push(arg1);return ret};imports.wbg.__wbg_set_3f1d0b984ed272ed=function(arg0,arg1,arg2){arg0[arg1]=arg2};imports.wbg.__wbg_set_781438a03c0c3c81=function(){return handleError(function(arg0,arg1,arg2){const ret=Reflect.set(arg0,arg1,arg2);return ret},arguments)};imports.wbg.__wbg_set_7df433eea03a5c14=function(arg0,arg1,arg2){arg0[arg1>>>0]=arg2};imports.wbg.__wbg_set_efaaf145b9377369=function(arg0,arg1,arg2){const ret=arg0.set(arg1,arg2);return ret};imports.wbg.__wbg_stack_0ed75d68575b0f3c=function(arg0,arg1){const ret=arg1.stack;const ptr1=passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(arg0+4,len1,true);getDataViewMemory0().setInt32(arg0+0,ptr1,true)};imports.wbg.__wbg_value_57b7b035e117f7ee=function(arg0){const ret=arg0.value;return ret};imports.wbg.__wbindgen_cast_2241b6af4c4b2941=function(arg0,arg1){const ret=getStringFromWasm0(arg0,arg1);return ret};imports.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(arg0){const ret=BigInt.asUintN(64,arg0);return ret};imports.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(arg0){const ret=arg0;return ret};imports.wbg.__wbindgen_init_externref_table=function(){const table=wasm.__wbindgen_externrefs;const offset=table.grow(4);table.set(0,void 0);table.set(offset+0,void 0);table.set(offset+1,null);table.set(offset+2,true);table.set(offset+3,false)};return imports}function __wbg_finalize_init(instance,module){wasm=instance.exports;__wbg_init.__wbindgen_wasm_module=module;cachedDataViewMemory0=null;cachedFloat32ArrayMemory0=null;cachedFloat64ArrayMemory0=null;cachedUint32ArrayMemory0=null;cachedUint8ArrayMemory0=null;wasm.__wbindgen_start();return wasm}function initSync(module){if(void 0!==wasm)return wasm;if(void 0!==module){if(Object.getPrototypeOf(module)===Object.prototype)({module}=module);else console.warn("using deprecated parameters for `initSync()`; pass a single object instead")}const imports=__wbg_get_imports();if(!(module instanceof WebAssembly.Module))module=new WebAssembly.Module(module);const instance=new WebAssembly.Instance(module,imports);return __wbg_finalize_init(instance,module)}async function __wbg_init(module_or_path){if(void 0!==wasm)return wasm;if(void 0!==module_or_path){if(Object.getPrototypeOf(module_or_path)===Object.prototype)({module_or_path}=module_or_path);else console.warn("using deprecated parameters for the initialization function; pass a single object instead")}if(void 0===module_or_path)module_or_path=new URL("rfkit_spectrum_analyzer_wasm_bg.wasm",import.meta.url);const imports=__wbg_get_imports();if("string"==typeof module_or_path||"function"==typeof Request&&module_or_path instanceof Request||"function"==typeof URL&&module_or_path instanceof URL)module_or_path=fetch(module_or_path);const{instance,module}=await __wbg_load(await module_or_path,imports);return __wbg_finalize_init(instance,module)}export default __wbg_init;export{initSync};