sentienceapi 0.90.12__py3-none-any.whl → 0.92.2__py3-none-any.whl
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.
Potentially problematic release.
This version of sentienceapi might be problematic. Click here for more details.
- sentience/__init__.py +14 -5
- sentience/_extension_loader.py +40 -0
- sentience/action_executor.py +215 -0
- sentience/actions.py +408 -25
- sentience/agent.py +804 -310
- sentience/agent_config.py +3 -0
- sentience/async_api.py +101 -0
- sentience/base_agent.py +95 -0
- sentience/browser.py +594 -25
- sentience/browser_evaluator.py +299 -0
- sentience/cloud_tracing.py +458 -36
- sentience/conversational_agent.py +79 -45
- sentience/element_filter.py +136 -0
- sentience/expect.py +98 -2
- sentience/extension/background.js +56 -185
- sentience/extension/content.js +117 -289
- sentience/extension/injected_api.js +799 -1374
- sentience/extension/manifest.json +1 -1
- sentience/extension/pkg/sentience_core.js +190 -396
- sentience/extension/pkg/sentience_core_bg.wasm +0 -0
- sentience/extension/release.json +47 -47
- sentience/formatting.py +9 -53
- sentience/inspector.py +183 -1
- sentience/llm_interaction_handler.py +191 -0
- sentience/llm_provider.py +256 -28
- sentience/llm_provider_utils.py +120 -0
- sentience/llm_response_builder.py +153 -0
- sentience/models.py +66 -1
- sentience/overlay.py +109 -2
- sentience/protocols.py +228 -0
- sentience/query.py +1 -1
- sentience/read.py +95 -3
- sentience/recorder.py +223 -3
- sentience/schemas/trace_v1.json +102 -9
- sentience/screenshot.py +48 -2
- sentience/sentience_methods.py +86 -0
- sentience/snapshot.py +309 -64
- sentience/snapshot_diff.py +141 -0
- sentience/text_search.py +119 -5
- sentience/trace_event_builder.py +129 -0
- sentience/trace_file_manager.py +197 -0
- sentience/trace_indexing/index_schema.py +95 -7
- sentience/trace_indexing/indexer.py +117 -14
- sentience/tracer_factory.py +119 -6
- sentience/tracing.py +172 -8
- sentience/utils/__init__.py +40 -0
- sentience/utils/browser.py +46 -0
- sentience/utils/element.py +257 -0
- sentience/utils/formatting.py +59 -0
- sentience/utils.py +1 -1
- sentience/visual_agent.py +2056 -0
- sentience/wait.py +70 -4
- {sentienceapi-0.90.12.dist-info → sentienceapi-0.92.2.dist-info}/METADATA +61 -22
- sentienceapi-0.92.2.dist-info/RECORD +65 -0
- sentienceapi-0.92.2.dist-info/licenses/LICENSE +24 -0
- sentienceapi-0.92.2.dist-info/licenses/LICENSE-APACHE +201 -0
- sentienceapi-0.92.2.dist-info/licenses/LICENSE-MIT +21 -0
- sentience/extension/test-content.js +0 -4
- sentienceapi-0.90.12.dist-info/RECORD +0 -46
- sentienceapi-0.90.12.dist-info/licenses/LICENSE.md +0 -43
- {sentienceapi-0.90.12.dist-info → sentienceapi-0.92.2.dist-info}/WHEEL +0 -0
- {sentienceapi-0.90.12.dist-info → sentienceapi-0.92.2.dist-info}/entry_points.txt +0 -0
- {sentienceapi-0.90.12.dist-info → sentienceapi-0.92.2.dist-info}/top_level.txt +0 -0
|
@@ -1,112 +1,70 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
3
|
function addHeapObject(obj) {
|
|
4
|
-
|
|
4
|
+
heap_next === heap.length && heap.push(heap.length + 1);
|
|
5
5
|
const idx = heap_next;
|
|
6
|
-
heap_next = heap[idx];
|
|
7
|
-
|
|
8
|
-
heap[idx] = obj;
|
|
9
|
-
return idx;
|
|
6
|
+
return heap_next = heap[idx], heap[idx] = obj, idx;
|
|
10
7
|
}
|
|
11
8
|
|
|
12
9
|
function debugString(val) {
|
|
13
|
-
// primitive types
|
|
14
10
|
const type = typeof val;
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (type == 'string') {
|
|
19
|
-
return `"${val}"`;
|
|
20
|
-
}
|
|
21
|
-
if (type == 'symbol') {
|
|
11
|
+
if ("number" == type || "boolean" == type || null == val) return `${val}`;
|
|
12
|
+
if ("string" == type) return `"${val}"`;
|
|
13
|
+
if ("symbol" == type) {
|
|
22
14
|
const description = val.description;
|
|
23
|
-
|
|
24
|
-
return 'Symbol';
|
|
25
|
-
} else {
|
|
26
|
-
return `Symbol(${description})`;
|
|
27
|
-
}
|
|
15
|
+
return null == description ? "Symbol" : `Symbol(${description})`;
|
|
28
16
|
}
|
|
29
|
-
if (
|
|
17
|
+
if ("function" == type) {
|
|
30
18
|
const name = val.name;
|
|
31
|
-
|
|
32
|
-
return `Function(${name})`;
|
|
33
|
-
} else {
|
|
34
|
-
return 'Function';
|
|
35
|
-
}
|
|
19
|
+
return "string" == typeof name && name.length > 0 ? `Function(${name})` : "Function";
|
|
36
20
|
}
|
|
37
|
-
// objects
|
|
38
21
|
if (Array.isArray(val)) {
|
|
39
22
|
const length = val.length;
|
|
40
|
-
let debug =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
for(let i = 1; i < length; i++) {
|
|
45
|
-
debug += ', ' + debugString(val[i]);
|
|
46
|
-
}
|
|
47
|
-
debug += ']';
|
|
48
|
-
return debug;
|
|
23
|
+
let debug = "[";
|
|
24
|
+
length > 0 && (debug += debugString(val[0]));
|
|
25
|
+
for (let i = 1; i < length; i++) debug += ", " + debugString(val[i]);
|
|
26
|
+
return debug += "]", debug;
|
|
49
27
|
}
|
|
50
|
-
// Test for built-in
|
|
51
28
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
52
29
|
let className;
|
|
53
|
-
if (builtInMatches && builtInMatches.length > 1)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return
|
|
30
|
+
if (!(builtInMatches && builtInMatches.length > 1)) return toString.call(val);
|
|
31
|
+
if (className = builtInMatches[1], "Object" == className) try {
|
|
32
|
+
return "Object(" + JSON.stringify(val) + ")";
|
|
33
|
+
} catch (_) {
|
|
34
|
+
return "Object";
|
|
58
35
|
}
|
|
59
|
-
|
|
60
|
-
// we're a user defined class or Object
|
|
61
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
62
|
-
// easier than looping through ownProperties of `val`.
|
|
63
|
-
try {
|
|
64
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
65
|
-
} catch (_) {
|
|
66
|
-
return 'Object';
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// errors
|
|
70
|
-
if (val instanceof Error) {
|
|
71
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
72
|
-
}
|
|
73
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
74
|
-
return className;
|
|
36
|
+
return val instanceof Error ? `${val.name}: ${val.message}\n${val.stack}` : className;
|
|
75
37
|
}
|
|
76
38
|
|
|
77
39
|
function dropObject(idx) {
|
|
78
|
-
|
|
79
|
-
heap[idx] = heap_next;
|
|
80
|
-
heap_next = idx;
|
|
40
|
+
idx < 132 || (heap[idx] = heap_next, heap_next = idx);
|
|
81
41
|
}
|
|
82
42
|
|
|
83
43
|
function getArrayU8FromWasm0(ptr, len) {
|
|
84
|
-
ptr
|
|
85
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
44
|
+
return ptr >>>= 0, getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
86
45
|
}
|
|
87
46
|
|
|
88
47
|
let cachedDataViewMemory0 = null;
|
|
48
|
+
|
|
89
49
|
function getDataViewMemory0() {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
return cachedDataViewMemory0;
|
|
50
|
+
return (null === cachedDataViewMemory0 || !0 === cachedDataViewMemory0.buffer.detached || void 0 === cachedDataViewMemory0.buffer.detached && cachedDataViewMemory0.buffer !== wasm.memory.buffer) && (cachedDataViewMemory0 = new DataView(wasm.memory.buffer)),
|
|
51
|
+
cachedDataViewMemory0;
|
|
94
52
|
}
|
|
95
53
|
|
|
96
54
|
function getStringFromWasm0(ptr, len) {
|
|
97
|
-
|
|
98
|
-
return decodeText(ptr, len);
|
|
55
|
+
return decodeText(ptr >>>= 0, len);
|
|
99
56
|
}
|
|
100
57
|
|
|
101
58
|
let cachedUint8ArrayMemory0 = null;
|
|
59
|
+
|
|
102
60
|
function getUint8ArrayMemory0() {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
return cachedUint8ArrayMemory0;
|
|
61
|
+
return null !== cachedUint8ArrayMemory0 && 0 !== cachedUint8ArrayMemory0.byteLength || (cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer)),
|
|
62
|
+
cachedUint8ArrayMemory0;
|
|
107
63
|
}
|
|
108
64
|
|
|
109
|
-
function getObject(idx) {
|
|
65
|
+
function getObject(idx) {
|
|
66
|
+
return heap[idx];
|
|
67
|
+
}
|
|
110
68
|
|
|
111
69
|
function handleError(f, args) {
|
|
112
70
|
try {
|
|
@@ -116,414 +74,250 @@ function handleError(f, args) {
|
|
|
116
74
|
}
|
|
117
75
|
}
|
|
118
76
|
|
|
119
|
-
let heap = new Array(128).fill(
|
|
120
|
-
|
|
77
|
+
let heap = new Array(128).fill(void 0);
|
|
78
|
+
|
|
79
|
+
heap.push(void 0, null, !0, !1);
|
|
121
80
|
|
|
122
81
|
let heap_next = heap.length;
|
|
123
82
|
|
|
124
83
|
function isLikeNone(x) {
|
|
125
|
-
return
|
|
84
|
+
return null == x;
|
|
126
85
|
}
|
|
127
86
|
|
|
128
87
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
129
|
-
if (
|
|
130
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
WASM_VECTOR_LEN = buf.length;
|
|
134
|
-
return ptr;
|
|
88
|
+
if (void 0 === realloc) {
|
|
89
|
+
const buf = cachedTextEncoder.encode(arg), ptr = malloc(buf.length, 1) >>> 0;
|
|
90
|
+
return getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf), WASM_VECTOR_LEN = buf.length,
|
|
91
|
+
ptr;
|
|
135
92
|
}
|
|
136
|
-
|
|
137
|
-
let len = arg.length;
|
|
138
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
139
|
-
|
|
93
|
+
let len = arg.length, ptr = malloc(len, 1) >>> 0;
|
|
140
94
|
const mem = getUint8ArrayMemory0();
|
|
141
|
-
|
|
142
95
|
let offset = 0;
|
|
143
|
-
|
|
144
|
-
for (; offset < len; offset++) {
|
|
96
|
+
for (;offset < len; offset++) {
|
|
145
97
|
const code = arg.charCodeAt(offset);
|
|
146
|
-
if (code >
|
|
98
|
+
if (code > 127) break;
|
|
147
99
|
mem[ptr + offset] = code;
|
|
148
100
|
}
|
|
149
101
|
if (offset !== len) {
|
|
150
|
-
|
|
151
|
-
arg = arg.slice(offset);
|
|
152
|
-
}
|
|
153
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
102
|
+
0 !== offset && (arg = arg.slice(offset)), ptr = realloc(ptr, len, len = offset + 3 * arg.length, 1) >>> 0;
|
|
154
103
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
offset += ret.written;
|
|
158
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
104
|
+
offset += cachedTextEncoder.encodeInto(arg, view).written, ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
159
105
|
}
|
|
160
|
-
|
|
161
|
-
WASM_VECTOR_LEN = offset;
|
|
162
|
-
return ptr;
|
|
106
|
+
return WASM_VECTOR_LEN = offset, ptr;
|
|
163
107
|
}
|
|
164
108
|
|
|
165
109
|
function takeObject(idx) {
|
|
166
110
|
const ret = getObject(idx);
|
|
167
|
-
dropObject(idx);
|
|
168
|
-
return ret;
|
|
111
|
+
return dropObject(idx), ret;
|
|
169
112
|
}
|
|
170
113
|
|
|
171
|
-
let cachedTextDecoder = new TextDecoder(
|
|
114
|
+
let cachedTextDecoder = new TextDecoder("utf-8", {
|
|
115
|
+
ignoreBOM: !0,
|
|
116
|
+
fatal: !0
|
|
117
|
+
});
|
|
118
|
+
|
|
172
119
|
cachedTextDecoder.decode();
|
|
120
|
+
|
|
173
121
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
122
|
+
|
|
174
123
|
let numBytesDecoded = 0;
|
|
124
|
+
|
|
175
125
|
function decodeText(ptr, len) {
|
|
176
|
-
numBytesDecoded += len
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
numBytesDecoded = len;
|
|
181
|
-
}
|
|
182
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
126
|
+
return numBytesDecoded += len, numBytesDecoded >= MAX_SAFARI_DECODE_BYTES && (cachedTextDecoder = new TextDecoder("utf-8", {
|
|
127
|
+
ignoreBOM: !0,
|
|
128
|
+
fatal: !0
|
|
129
|
+
}), cachedTextDecoder.decode(), numBytesDecoded = len), cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
183
130
|
}
|
|
184
131
|
|
|
185
|
-
const cachedTextEncoder = new TextEncoder
|
|
132
|
+
const cachedTextEncoder = new TextEncoder;
|
|
186
133
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
134
|
+
"encodeInto" in cachedTextEncoder || (cachedTextEncoder.encodeInto = function(arg, view) {
|
|
135
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
136
|
+
return view.set(buf), {
|
|
137
|
+
read: arg.length,
|
|
138
|
+
written: buf.length
|
|
139
|
+
};
|
|
140
|
+
});
|
|
197
141
|
|
|
198
142
|
let WASM_VECTOR_LEN = 0;
|
|
199
143
|
|
|
200
|
-
/**
|
|
201
|
-
* @param {any} val
|
|
202
|
-
* @returns {any}
|
|
203
|
-
*/
|
|
204
144
|
export function analyze_page(val) {
|
|
205
|
-
|
|
206
|
-
return takeObject(ret);
|
|
145
|
+
return takeObject(wasm.analyze_page(addHeapObject(val)));
|
|
207
146
|
}
|
|
208
147
|
|
|
209
|
-
/**
|
|
210
|
-
* @param {any} val
|
|
211
|
-
* @param {any} options
|
|
212
|
-
* @returns {any}
|
|
213
|
-
*/
|
|
214
148
|
export function analyze_page_with_options(val, options) {
|
|
215
|
-
|
|
216
|
-
return takeObject(ret);
|
|
149
|
+
return takeObject(wasm.analyze_page_with_options(addHeapObject(val), addHeapObject(options)));
|
|
217
150
|
}
|
|
218
151
|
|
|
219
|
-
/**
|
|
220
|
-
* @param {any} _raw_elements
|
|
221
|
-
*/
|
|
222
152
|
export function decide_and_act(_raw_elements) {
|
|
223
153
|
wasm.decide_and_act(addHeapObject(_raw_elements));
|
|
224
154
|
}
|
|
225
155
|
|
|
226
|
-
/**
|
|
227
|
-
* Prune raw elements before sending to API
|
|
228
|
-
* This is a "dumb" filter that reduces payload size without leaking proprietary IP
|
|
229
|
-
* Filters out: tiny elements, invisible elements, non-interactive wrapper divs
|
|
230
|
-
* Amazon: 5000-6000 elements -> ~200-400 elements (~95% reduction)
|
|
231
|
-
* @param {any} val
|
|
232
|
-
* @returns {any}
|
|
233
|
-
*/
|
|
234
156
|
export function prune_for_api(val) {
|
|
235
|
-
|
|
236
|
-
return takeObject(ret);
|
|
157
|
+
return takeObject(wasm.prune_for_api(addHeapObject(val)));
|
|
237
158
|
}
|
|
238
159
|
|
|
239
|
-
const EXPECTED_RESPONSE_TYPES = new Set([
|
|
160
|
+
const EXPECTED_RESPONSE_TYPES = new Set([ "basic", "cors", "default" ]);
|
|
240
161
|
|
|
241
162
|
async function __wbg_load(module, imports) {
|
|
242
|
-
if (typeof Response
|
|
243
|
-
if (typeof WebAssembly.instantiateStreaming
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
248
|
-
|
|
249
|
-
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
250
|
-
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);
|
|
251
|
-
|
|
252
|
-
} else {
|
|
253
|
-
throw e;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
163
|
+
if ("function" == typeof Response && module instanceof Response) {
|
|
164
|
+
if ("function" == typeof WebAssembly.instantiateStreaming) try {
|
|
165
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
166
|
+
} catch (e) {
|
|
167
|
+
if (!(module.ok && EXPECTED_RESPONSE_TYPES.has(module.type)) || "application/wasm" === module.headers.get("Content-Type")) throw e;
|
|
256
168
|
}
|
|
257
|
-
|
|
258
169
|
const bytes = await module.arrayBuffer();
|
|
259
170
|
return await WebAssembly.instantiate(bytes, imports);
|
|
260
|
-
}
|
|
171
|
+
}
|
|
172
|
+
{
|
|
261
173
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
return instance;
|
|
267
|
-
}
|
|
174
|
+
return instance instanceof WebAssembly.Instance ? {
|
|
175
|
+
instance: instance,
|
|
176
|
+
module: module
|
|
177
|
+
} : instance;
|
|
268
178
|
}
|
|
269
179
|
}
|
|
270
180
|
|
|
271
181
|
function __wbg_get_imports() {
|
|
272
|
-
const imports = {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return addHeapObject(
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
imports.wbg.
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const len1 = WASM_VECTOR_LEN;
|
|
297
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
298
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
299
|
-
};
|
|
300
|
-
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
301
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
302
|
-
return ret;
|
|
303
|
-
};
|
|
304
|
-
imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
305
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
306
|
-
return ret;
|
|
307
|
-
};
|
|
308
|
-
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
309
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
310
|
-
return ret;
|
|
311
|
-
};
|
|
312
|
-
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
182
|
+
const imports = {
|
|
183
|
+
wbg: {}
|
|
184
|
+
};
|
|
185
|
+
return imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
186
|
+
return addHeapObject(Error(getStringFromWasm0(arg0, arg1)));
|
|
187
|
+
}, imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
|
|
188
|
+
return Number(getObject(arg0));
|
|
189
|
+
}, imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
|
|
190
|
+
const v = getObject(arg1), ret = "bigint" == typeof v ? v : void 0;
|
|
191
|
+
getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, !0),
|
|
192
|
+
getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), !0);
|
|
193
|
+
}, imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
|
|
194
|
+
const v = getObject(arg0), ret = "boolean" == typeof v ? v : void 0;
|
|
195
|
+
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
196
|
+
}, imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
197
|
+
const ptr1 = passStringToWasm0(debugString(getObject(arg1)), wasm.__wbindgen_export, wasm.__wbindgen_export2), len1 = WASM_VECTOR_LEN;
|
|
198
|
+
getDataViewMemory0().setInt32(arg0 + 4, len1, !0), getDataViewMemory0().setInt32(arg0 + 0, ptr1, !0);
|
|
199
|
+
}, imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
200
|
+
return getObject(arg0) in getObject(arg1);
|
|
201
|
+
}, imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
202
|
+
return "bigint" == typeof getObject(arg0);
|
|
203
|
+
}, imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
204
|
+
return "function" == typeof getObject(arg0);
|
|
205
|
+
}, imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
313
206
|
const val = getObject(arg0);
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
imports.wbg.
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
imports.wbg.
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
330
|
-
const obj = getObject(arg1);
|
|
331
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
332
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
333
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
334
|
-
};
|
|
335
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
336
|
-
const obj = getObject(arg1);
|
|
337
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
338
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
339
|
-
var len1 = WASM_VECTOR_LEN;
|
|
340
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
341
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
342
|
-
};
|
|
343
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
207
|
+
return "object" == typeof val && null !== val;
|
|
208
|
+
}, imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
209
|
+
return void 0 === getObject(arg0);
|
|
210
|
+
}, imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
211
|
+
return getObject(arg0) === getObject(arg1);
|
|
212
|
+
}, imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
213
|
+
return getObject(arg0) == getObject(arg1);
|
|
214
|
+
}, imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
215
|
+
const obj = getObject(arg1), ret = "number" == typeof obj ? obj : void 0;
|
|
216
|
+
getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, !0), getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), !0);
|
|
217
|
+
}, imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
218
|
+
const obj = getObject(arg1), ret = "string" == typeof obj ? obj : void 0;
|
|
219
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2), len1 = WASM_VECTOR_LEN;
|
|
220
|
+
getDataViewMemory0().setInt32(arg0 + 4, len1, !0), getDataViewMemory0().setInt32(arg0 + 0, ptr1, !0);
|
|
221
|
+
}, imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
344
222
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
imports.wbg.
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
};
|
|
361
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
362
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
363
|
-
return addHeapObject(ret);
|
|
364
|
-
}, arguments) };
|
|
365
|
-
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
366
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
367
|
-
return addHeapObject(ret);
|
|
368
|
-
};
|
|
369
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
223
|
+
}, imports.wbg.__wbg_call_abb4ff46ce38be40 = function() {
|
|
224
|
+
return handleError(function(arg0, arg1) {
|
|
225
|
+
return addHeapObject(getObject(arg0).call(getObject(arg1)));
|
|
226
|
+
}, arguments);
|
|
227
|
+
}, imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
228
|
+
return getObject(arg0).done;
|
|
229
|
+
}, imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) {}, imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
230
|
+
return addHeapObject(getObject(arg0)[arg1 >>> 0]);
|
|
231
|
+
}, imports.wbg.__wbg_get_af9dab7e9603ea93 = function() {
|
|
232
|
+
return handleError(function(arg0, arg1) {
|
|
233
|
+
return addHeapObject(Reflect.get(getObject(arg0), getObject(arg1)));
|
|
234
|
+
}, arguments);
|
|
235
|
+
}, imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
236
|
+
return addHeapObject(getObject(arg0)[getObject(arg1)]);
|
|
237
|
+
}, imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
370
238
|
let result;
|
|
371
239
|
try {
|
|
372
240
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
373
241
|
} catch (_) {
|
|
374
|
-
result =
|
|
242
|
+
result = !1;
|
|
375
243
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
};
|
|
379
|
-
imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
244
|
+
return result;
|
|
245
|
+
}, imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
|
|
380
246
|
let result;
|
|
381
247
|
try {
|
|
382
248
|
result = getObject(arg0) instanceof Uint8Array;
|
|
383
249
|
} catch (_) {
|
|
384
|
-
result =
|
|
250
|
+
result = !1;
|
|
385
251
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
imports.wbg.
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
imports.wbg.
|
|
394
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
395
|
-
return ret;
|
|
396
|
-
};
|
|
397
|
-
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
398
|
-
const ret = Symbol.iterator;
|
|
399
|
-
return addHeapObject(ret);
|
|
400
|
-
};
|
|
401
|
-
imports.wbg.__wbg_js_click_element_2fe1e774f3d232c7 = function(arg0) {
|
|
252
|
+
return result;
|
|
253
|
+
}, imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
254
|
+
return Array.isArray(getObject(arg0));
|
|
255
|
+
}, imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
256
|
+
return Number.isSafeInteger(getObject(arg0));
|
|
257
|
+
}, imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
258
|
+
return addHeapObject(Symbol.iterator);
|
|
259
|
+
}, imports.wbg.__wbg_js_click_element_2fe1e774f3d232c7 = function(arg0) {
|
|
402
260
|
js_click_element(arg0);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
return
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
return
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
return addHeapObject(
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}
|
|
420
|
-
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
421
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
422
|
-
return addHeapObject(ret);
|
|
423
|
-
};
|
|
424
|
-
imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
425
|
-
const ret = getObject(arg0).next;
|
|
426
|
-
return addHeapObject(ret);
|
|
427
|
-
};
|
|
428
|
-
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
429
|
-
const ret = getObject(arg0).next();
|
|
430
|
-
return addHeapObject(ret);
|
|
431
|
-
}, arguments) };
|
|
432
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
261
|
+
}, imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
262
|
+
return getObject(arg0).length;
|
|
263
|
+
}, imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
264
|
+
return getObject(arg0).length;
|
|
265
|
+
}, imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
266
|
+
return addHeapObject(new Object);
|
|
267
|
+
}, imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
268
|
+
return addHeapObject(new Array);
|
|
269
|
+
}, imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
270
|
+
return addHeapObject(new Uint8Array(getObject(arg0)));
|
|
271
|
+
}, imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
272
|
+
return addHeapObject(getObject(arg0).next);
|
|
273
|
+
}, imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() {
|
|
274
|
+
return handleError(function(arg0) {
|
|
275
|
+
return addHeapObject(getObject(arg0).next());
|
|
276
|
+
}, arguments);
|
|
277
|
+
}, imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
433
278
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
434
|
-
}
|
|
435
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
279
|
+
}, imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
436
280
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
437
|
-
}
|
|
438
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
281
|
+
}, imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
439
282
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
return addHeapObject(
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
imports.wbg.
|
|
451
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
452
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
453
|
-
return addHeapObject(ret);
|
|
454
|
-
};
|
|
455
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
456
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
457
|
-
const ret = arg0;
|
|
458
|
-
return addHeapObject(ret);
|
|
459
|
-
};
|
|
460
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
461
|
-
const ret = getObject(arg0);
|
|
462
|
-
return addHeapObject(ret);
|
|
463
|
-
};
|
|
464
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
283
|
+
}, imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
284
|
+
return addHeapObject(getObject(arg0).value);
|
|
285
|
+
}, imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
286
|
+
return addHeapObject(getStringFromWasm0(arg0, arg1));
|
|
287
|
+
}, imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
288
|
+
return addHeapObject(BigInt.asUintN(64, arg0));
|
|
289
|
+
}, imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
290
|
+
return addHeapObject(arg0);
|
|
291
|
+
}, imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
292
|
+
return addHeapObject(getObject(arg0));
|
|
293
|
+
}, imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
465
294
|
takeObject(arg0);
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
return imports;
|
|
295
|
+
}, imports;
|
|
469
296
|
}
|
|
470
297
|
|
|
471
298
|
function __wbg_finalize_init(instance, module) {
|
|
472
|
-
wasm = instance.exports
|
|
473
|
-
|
|
474
|
-
cachedDataViewMemory0 = null;
|
|
475
|
-
cachedUint8ArrayMemory0 = null;
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
return wasm;
|
|
299
|
+
return wasm = instance.exports, __wbg_init.__wbindgen_wasm_module = module, cachedDataViewMemory0 = null,
|
|
300
|
+
cachedUint8ArrayMemory0 = null, wasm;
|
|
480
301
|
}
|
|
481
302
|
|
|
482
303
|
function initSync(module) {
|
|
483
|
-
if (
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
if (typeof module !== 'undefined') {
|
|
487
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
488
|
-
({module} = module)
|
|
489
|
-
} else {
|
|
490
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
304
|
+
if (void 0 !== wasm) return wasm;
|
|
305
|
+
void 0 !== module && Object.getPrototypeOf(module) === Object.prototype && ({module: module} = module);
|
|
494
306
|
const imports = __wbg_get_imports();
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
}
|
|
498
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
499
|
-
return __wbg_finalize_init(instance, module);
|
|
307
|
+
module instanceof WebAssembly.Module || (module = new WebAssembly.Module(module));
|
|
308
|
+
return __wbg_finalize_init(new WebAssembly.Instance(module, imports), module);
|
|
500
309
|
}
|
|
501
310
|
|
|
502
311
|
async function __wbg_init(module_or_path) {
|
|
503
|
-
if (
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
if (typeof module_or_path !== 'undefined') {
|
|
507
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
508
|
-
({module_or_path} = module_or_path)
|
|
509
|
-
} else {
|
|
510
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
if (typeof module_or_path === 'undefined') {
|
|
515
|
-
module_or_path = new URL('sentience_core_bg.wasm', import.meta.url);
|
|
516
|
-
}
|
|
312
|
+
if (void 0 !== wasm) return wasm;
|
|
313
|
+
void 0 !== module_or_path && Object.getPrototypeOf(module_or_path) === Object.prototype && ({module_or_path: module_or_path} = module_or_path),
|
|
314
|
+
void 0 === module_or_path && (module_or_path = new URL("sentience_core_bg.wasm", import.meta.url));
|
|
517
315
|
const imports = __wbg_get_imports();
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
module_or_path = fetch(module_or_path);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
524
|
-
|
|
316
|
+
("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));
|
|
317
|
+
const {instance: instance, module: module} = await __wbg_load(await module_or_path, imports);
|
|
525
318
|
return __wbg_finalize_init(instance, module);
|
|
526
319
|
}
|
|
527
320
|
|
|
528
321
|
export { initSync };
|
|
529
|
-
|
|
322
|
+
|
|
323
|
+
export default __wbg_init;
|