@lynx-js/web-core-wasm-canary 0.0.0 → 0.0.1-canary-20260116-ff5a5b09
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/CHANGELOG.md +8 -0
- package/{LICENSE → LICENSE.txt} +1 -1
- package/Notice.txt +1 -0
- package/README.md +1 -0
- package/binary/client/client.d.ts +263 -0
- package/binary/client/client.js +1339 -0
- package/binary/client/client_bg.wasm +0 -0
- package/binary/client/client_bg.wasm.d.ts +70 -0
- package/binary/client/client_debug.d.ts +263 -0
- package/binary/client/client_debug.js +1339 -0
- package/binary/client/client_debug_bg.wasm +0 -0
- package/binary/client/client_debug_bg.wasm.d.ts +70 -0
- package/binary/encode/encode.d.ts +157 -0
- package/binary/encode/encode.js +17 -0
- package/binary/encode/encode_bg.js +749 -0
- package/binary/encode/encode_bg.wasm +0 -0
- package/binary/encode/encode_bg.wasm.d.ts +50 -0
- package/binary/encode/encode_debug.d.ts +157 -0
- package/binary/encode/encode_debug.js +17 -0
- package/binary/encode/encode_debug_bg.js +822 -0
- package/binary/encode/encode_debug_bg.wasm +0 -0
- package/binary/encode/encode_debug_bg.wasm.d.ts +50 -0
- package/binary/encode/package.json +4 -0
- package/css/in_shadow.css +10 -0
- package/css/index.css +119 -0
- package/dist/client/LynxCrossThreadContext.d.ts +22 -0
- package/dist/client/LynxCrossThreadContext.js +44 -0
- package/dist/client/background/background-apis/createBackgroundLynx.d.ts +24 -0
- package/dist/client/background/background-apis/createBackgroundLynx.js +38 -0
- package/dist/client/background/background-apis/createChunkLoading.d.ts +7 -0
- package/dist/client/background/background-apis/createChunkLoading.js +66 -0
- package/dist/client/background/background-apis/createElement.d.ts +5 -0
- package/dist/client/background/background-apis/createElement.js +18 -0
- package/dist/client/background/background-apis/createNapiLoader.d.ts +5 -0
- package/dist/client/background/background-apis/createNapiLoader.js +23 -0
- package/dist/client/background/background-apis/createNativeApp.d.ts +4 -0
- package/dist/client/background/background-apis/createNativeApp.js +98 -0
- package/dist/client/background/background-apis/createNativeModules.d.ts +3 -0
- package/dist/client/background/background-apis/createNativeModules.js +33 -0
- package/dist/client/background/background-apis/createPerformanceApis.d.ts +3 -0
- package/dist/client/background/background-apis/createPerformanceApis.js +47 -0
- package/dist/client/background/background-apis/createTimingSystem.d.ts +8 -0
- package/dist/client/background/background-apis/createTimingSystem.js +86 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetCustomSection.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetCustomSection.js +14 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetPathInfo.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createGetPathInfo.js +23 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createInvokeUIMethod.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createInvokeUIMethod.js +24 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createJSObjectDestructionObserver.d.ts +2 -0
- package/dist/client/background/background-apis/crossThreadHandlers/createJSObjectDestructionObserver.js +12 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerDisposeHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerDisposeHandler.js +9 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublicComponentEventHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublicComponentEventHandler.js +8 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublishEventHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerPublishEventHandler.js +8 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerSendGlobalEvent.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerSendGlobalEvent.js +10 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateDataHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateDataHandler.js +5 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateGlobalPropsHandler.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateGlobalPropsHandler.js +5 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateI18nResource.d.ts +3 -0
- package/dist/client/background/background-apis/crossThreadHandlers/registerUpdateI18nResource.js +9 -0
- package/dist/client/background/background-apis/startBackgroundThread.d.ts +2 -0
- package/dist/client/background/background-apis/startBackgroundThread.js +42 -0
- package/dist/client/background/index.d.ts +1 -0
- package/dist/client/background/index.js +15 -0
- package/dist/client/decodeWorker/cssLoader.d.ts +12 -0
- package/dist/client/decodeWorker/cssLoader.js +96 -0
- package/dist/client/decodeWorker/decode.worker.d.ts +1 -0
- package/dist/client/decodeWorker/decode.worker.js +338 -0
- package/dist/client/decodeWorker/types.d.ts +32 -0
- package/dist/client/decodeWorker/types.js +2 -0
- package/dist/client/endpoints.d.ts +53 -0
- package/dist/client/endpoints.js +37 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +3 -0
- package/dist/client/mainthread/Background.d.ts +30 -0
- package/dist/client/mainthread/Background.js +207 -0
- package/dist/client/mainthread/ExposureServices.d.ts +11 -0
- package/dist/client/mainthread/ExposureServices.js +211 -0
- package/dist/client/mainthread/I18n.d.ts +9 -0
- package/dist/client/mainthread/I18n.js +44 -0
- package/dist/client/mainthread/LynxView.d.ts +170 -0
- package/dist/client/mainthread/LynxView.js +367 -0
- package/dist/client/mainthread/LynxViewInstance.d.ts +56 -0
- package/dist/client/mainthread/LynxViewInstance.js +196 -0
- package/dist/client/mainthread/StyleManager.d.ts +15 -0
- package/dist/client/mainthread/StyleManager.js +72 -0
- package/dist/client/mainthread/TemplateManager.d.ts +11 -0
- package/dist/client/mainthread/TemplateManager.js +257 -0
- package/dist/client/mainthread/createIFrameRealm.d.ts +6 -0
- package/dist/client/mainthread/createIFrameRealm.js +68 -0
- package/dist/client/mainthread/createMainThreadGlobalAPIs.d.ts +3 -0
- package/dist/client/mainthread/createMainThreadGlobalAPIs.js +82 -0
- package/dist/client/mainthread/crossThreadHandlers/queryNodes.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/queryNodes.js +74 -0
- package/dist/client/mainthread/crossThreadHandlers/registerGetPathInfoHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerGetPathInfoHandler.js +51 -0
- package/dist/client/mainthread/crossThreadHandlers/registerInvokeUIMethodHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerInvokeUIMethodHandler.js +49 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNapiModulesCallHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNapiModulesCallHandler.js +8 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNativeModulesCallHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerNativeModulesCallHandler.js +7 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSelectComponentHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSelectComponentHandler.js +20 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSetNativePropsHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerSetNativePropsHandler.js +28 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerComponentEventHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerComponentEventHandler.js +12 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerElementMethodEndpointHandler.d.ts +3 -0
- package/dist/client/mainthread/crossThreadHandlers/registerTriggerElementMethodEndpointHandler.js +29 -0
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.d.ts +38 -0
- package/dist/client/mainthread/elementAPIs/WASMJSBinding.js +122 -0
- package/dist/client/mainthread/elementAPIs/createCrossThreadEvent.d.ts +2 -0
- package/dist/client/mainthread/elementAPIs/createCrossThreadEvent.js +77 -0
- package/dist/client/mainthread/elementAPIs/createElementAPI.d.ts +3 -0
- package/dist/client/mainthread/elementAPIs/createElementAPI.js +346 -0
- package/dist/client/mainthread/elementAPIs/index.d.ts +2 -0
- package/dist/client/mainthread/elementAPIs/index.js +3 -0
- package/dist/client/mainthread/elementAPIs/pureElementPAPIs.d.ts +26 -0
- package/dist/client/mainthread/elementAPIs/pureElementPAPIs.js +85 -0
- package/dist/client/mainthread/utils/convertLengthToPx.d.ts +1 -0
- package/dist/client/mainthread/utils/convertLengthToPx.js +25 -0
- package/dist/client/wasm.d.ts +11 -0
- package/dist/client/wasm.js +52 -0
- package/dist/client/webElementsDynamicLoader.d.ts +8 -0
- package/dist/client/webElementsDynamicLoader.js +80 -0
- package/dist/client_prod/static/css/async/web-core-main-chunk.css +1 -0
- package/dist/client_prod/static/css/client.css +1 -0
- package/dist/client_prod/static/js/async/lynx-core-chunk.js +3 -0
- package/dist/client_prod/static/js/async/web-core-main-chunk.js +303 -0
- package/dist/client_prod/static/js/async/web-core-template-loader-thread.js +8 -0
- package/dist/client_prod/static/js/async/web-core-worker-chunk.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-audio.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-foldview.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-input.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-list.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-overlay.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-refrshview.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-swiper.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-textarea.js +1 -0
- package/dist/client_prod/static/js/async/web-elements-viewpager.js +1 -0
- package/dist/client_prod/static/js/client.js +2 -0
- package/dist/client_prod/static/wasm/e7da3f5d.module.wasm +0 -0
- package/dist/constants.d.ts +58 -0
- package/dist/constants.js +114 -0
- package/dist/encode/encodeCSS.d.ts +3 -0
- package/dist/encode/encodeCSS.js +99 -0
- package/dist/encode/encodeElementTemplate.d.ts +2 -0
- package/dist/encode/encodeElementTemplate.js +52 -0
- package/dist/encode/index.d.ts +1 -0
- package/dist/encode/index.js +7 -0
- package/dist/encode/webEncoder.d.ts +21 -0
- package/dist/encode/webEncoder.js +125 -0
- package/dist/types/BTSChunk.d.ts +3 -0
- package/dist/types/BTSChunk.js +5 -0
- package/dist/types/Cloneable.d.ts +2 -0
- package/dist/types/Cloneable.js +2 -0
- package/dist/types/DecodedTemplate.d.ts +10 -0
- package/dist/types/DecodedTemplate.js +7 -0
- package/dist/types/Element.d.ts +35 -0
- package/dist/types/Element.js +5 -0
- package/dist/types/ElementTemplateData.d.ts +15 -0
- package/dist/types/ElementTemplateData.js +7 -0
- package/dist/types/EventType.d.ts +56 -0
- package/dist/types/EventType.js +5 -0
- package/dist/types/I18nTypes.d.ts +21 -0
- package/dist/types/I18nTypes.js +2 -0
- package/dist/types/IElementPAPI.d.ts +184 -0
- package/dist/types/IElementPAPI.js +2 -0
- package/dist/types/IMtsBinding.d.ts +11 -0
- package/dist/types/IMtsBinding.js +7 -0
- package/dist/types/JSRealm.d.ts +5 -0
- package/dist/types/JSRealm.js +7 -0
- package/dist/types/LynxContextEventTarget.d.ts +12 -0
- package/dist/types/LynxContextEventTarget.js +5 -0
- package/dist/types/MainThreadLynx.d.ts +15 -0
- package/dist/types/MainThreadLynx.js +2 -0
- package/dist/types/NapiModules.d.ts +9 -0
- package/dist/types/NapiModules.js +5 -0
- package/dist/types/NativeApp.d.ts +120 -0
- package/dist/types/NativeApp.js +5 -0
- package/dist/types/NativeModules.d.ts +2 -0
- package/dist/types/NativeModules.js +5 -0
- package/dist/types/PageConfig.d.ts +9 -0
- package/dist/types/PageConfig.js +2 -0
- package/dist/types/ProcessDataCallback.d.ts +1 -0
- package/dist/types/ProcessDataCallback.js +2 -0
- package/dist/types/TimingAPIs.d.ts +32 -0
- package/dist/types/TimingAPIs.js +5 -0
- package/dist/types/UpdateDataOptions.d.ts +8 -0
- package/dist/types/UpdateDataOptions.js +6 -0
- package/dist/types/WorkerStartMessage.d.ts +14 -0
- package/dist/types/WorkerStartMessage.js +5 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.js +7 -0
- package/eslint.config.js +34 -0
- package/package.json +87 -4
- package/index.js +0 -1
- package/selfIdentity.plist +0 -0
|
@@ -0,0 +1,1339 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
|
|
5
|
+
function getUint8ArrayMemory0() {
|
|
6
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
7
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
8
|
+
}
|
|
9
|
+
return cachedUint8ArrayMemory0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
13
|
+
|
|
14
|
+
cachedTextDecoder.decode();
|
|
15
|
+
|
|
16
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
|
+
let numBytesDecoded = 0;
|
|
18
|
+
function decodeText(ptr, len) {
|
|
19
|
+
numBytesDecoded += len;
|
|
20
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
22
|
+
cachedTextDecoder.decode();
|
|
23
|
+
numBytesDecoded = len;
|
|
24
|
+
}
|
|
25
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getStringFromWasm0(ptr, len) {
|
|
29
|
+
ptr = ptr >>> 0;
|
|
30
|
+
return decodeText(ptr, len);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function debugString(val) {
|
|
34
|
+
// primitive types
|
|
35
|
+
const type = typeof val;
|
|
36
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
37
|
+
return `${val}`;
|
|
38
|
+
}
|
|
39
|
+
if (type == 'string') {
|
|
40
|
+
return `"${val}"`;
|
|
41
|
+
}
|
|
42
|
+
if (type == 'symbol') {
|
|
43
|
+
const description = val.description;
|
|
44
|
+
if (description == null) {
|
|
45
|
+
return 'Symbol';
|
|
46
|
+
} else {
|
|
47
|
+
return `Symbol(${description})`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (type == 'function') {
|
|
51
|
+
const name = val.name;
|
|
52
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
53
|
+
return `Function(${name})`;
|
|
54
|
+
} else {
|
|
55
|
+
return 'Function';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// objects
|
|
59
|
+
if (Array.isArray(val)) {
|
|
60
|
+
const length = val.length;
|
|
61
|
+
let debug = '[';
|
|
62
|
+
if (length > 0) {
|
|
63
|
+
debug += debugString(val[0]);
|
|
64
|
+
}
|
|
65
|
+
for(let i = 1; i < length; i++) {
|
|
66
|
+
debug += ', ' + debugString(val[i]);
|
|
67
|
+
}
|
|
68
|
+
debug += ']';
|
|
69
|
+
return debug;
|
|
70
|
+
}
|
|
71
|
+
// Test for built-in
|
|
72
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
73
|
+
let className;
|
|
74
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
75
|
+
className = builtInMatches[1];
|
|
76
|
+
} else {
|
|
77
|
+
// Failed to match the standard '[object ClassName]'
|
|
78
|
+
return toString.call(val);
|
|
79
|
+
}
|
|
80
|
+
if (className == 'Object') {
|
|
81
|
+
// we're a user defined class or Object
|
|
82
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
83
|
+
// easier than looping through ownProperties of `val`.
|
|
84
|
+
try {
|
|
85
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
86
|
+
} catch (_) {
|
|
87
|
+
return 'Object';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// errors
|
|
91
|
+
if (val instanceof Error) {
|
|
92
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
93
|
+
}
|
|
94
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
95
|
+
return className;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
let WASM_VECTOR_LEN = 0;
|
|
99
|
+
|
|
100
|
+
const cachedTextEncoder = new TextEncoder();
|
|
101
|
+
|
|
102
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
103
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
104
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
105
|
+
view.set(buf);
|
|
106
|
+
return {
|
|
107
|
+
read: arg.length,
|
|
108
|
+
written: buf.length
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
114
|
+
|
|
115
|
+
if (realloc === undefined) {
|
|
116
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
117
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
118
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
119
|
+
WASM_VECTOR_LEN = buf.length;
|
|
120
|
+
return ptr;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let len = arg.length;
|
|
124
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
125
|
+
|
|
126
|
+
const mem = getUint8ArrayMemory0();
|
|
127
|
+
|
|
128
|
+
let offset = 0;
|
|
129
|
+
|
|
130
|
+
for (; offset < len; offset++) {
|
|
131
|
+
const code = arg.charCodeAt(offset);
|
|
132
|
+
if (code > 0x7F) break;
|
|
133
|
+
mem[ptr + offset] = code;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (offset !== len) {
|
|
137
|
+
if (offset !== 0) {
|
|
138
|
+
arg = arg.slice(offset);
|
|
139
|
+
}
|
|
140
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
141
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
142
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
143
|
+
|
|
144
|
+
offset += ret.written;
|
|
145
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
WASM_VECTOR_LEN = offset;
|
|
149
|
+
return ptr;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
let cachedDataViewMemory0 = null;
|
|
153
|
+
|
|
154
|
+
function getDataViewMemory0() {
|
|
155
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
156
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
157
|
+
}
|
|
158
|
+
return cachedDataViewMemory0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function isLikeNone(x) {
|
|
162
|
+
return x === undefined || x === null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function addToExternrefTable0(obj) {
|
|
166
|
+
const idx = wasm.__externref_table_alloc();
|
|
167
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
168
|
+
return idx;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function handleError(f, args) {
|
|
172
|
+
try {
|
|
173
|
+
return f.apply(this, args);
|
|
174
|
+
} catch (e) {
|
|
175
|
+
const idx = addToExternrefTable0(e);
|
|
176
|
+
wasm.__wbindgen_exn_store(idx);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
181
|
+
ptr = ptr >>> 0;
|
|
182
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
let cachedUint32ArrayMemory0 = null;
|
|
186
|
+
|
|
187
|
+
function getUint32ArrayMemory0() {
|
|
188
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
189
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
190
|
+
}
|
|
191
|
+
return cachedUint32ArrayMemory0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
195
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
196
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
197
|
+
WASM_VECTOR_LEN = arg.length;
|
|
198
|
+
return ptr;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function takeFromExternrefTable0(idx) {
|
|
202
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
203
|
+
wasm.__externref_table_dealloc(idx);
|
|
204
|
+
return value;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
208
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
209
|
+
for (let i = 0; i < array.length; i++) {
|
|
210
|
+
const add = addToExternrefTable0(array[i]);
|
|
211
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
212
|
+
}
|
|
213
|
+
WASM_VECTOR_LEN = array.length;
|
|
214
|
+
return ptr;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function _assertClass(instance, klass) {
|
|
218
|
+
if (!(instance instanceof klass)) {
|
|
219
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
224
|
+
ptr = ptr >>> 0;
|
|
225
|
+
const mem = getDataViewMemory0();
|
|
226
|
+
const result = [];
|
|
227
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
228
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
229
|
+
}
|
|
230
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
231
|
+
return result;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const DecodedStyleDataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
235
|
+
? { register: () => {}, unregister: () => {} }
|
|
236
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_decodedstyledata_free(ptr >>> 0, 1));
|
|
237
|
+
|
|
238
|
+
export class DecodedStyleData {
|
|
239
|
+
|
|
240
|
+
__destroy_into_raw() {
|
|
241
|
+
const ptr = this.__wbg_ptr;
|
|
242
|
+
this.__wbg_ptr = 0;
|
|
243
|
+
DecodedStyleDataFinalization.unregister(this);
|
|
244
|
+
return ptr;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
free() {
|
|
248
|
+
const ptr = this.__destroy_into_raw();
|
|
249
|
+
wasm.__wbg_decodedstyledata_free(ptr, 0);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* @param {Uint8Array} buffer
|
|
253
|
+
*/
|
|
254
|
+
constructor(buffer) {
|
|
255
|
+
const ret = wasm.decodedstyledata_new(buffer);
|
|
256
|
+
if (ret[2]) {
|
|
257
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
258
|
+
}
|
|
259
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
260
|
+
DecodedStyleDataFinalization.register(this, this.__wbg_ptr, this);
|
|
261
|
+
return this;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* @returns {string}
|
|
265
|
+
*/
|
|
266
|
+
get style_content() {
|
|
267
|
+
let deferred1_0;
|
|
268
|
+
let deferred1_1;
|
|
269
|
+
try {
|
|
270
|
+
const ret = wasm.decodedstyledata_style_content(this.__wbg_ptr);
|
|
271
|
+
deferred1_0 = ret[0];
|
|
272
|
+
deferred1_1 = ret[1];
|
|
273
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
274
|
+
} finally {
|
|
275
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* @returns {string}
|
|
280
|
+
*/
|
|
281
|
+
get font_face_content() {
|
|
282
|
+
let deferred1_0;
|
|
283
|
+
let deferred1_1;
|
|
284
|
+
try {
|
|
285
|
+
const ret = wasm.decodedstyledata_font_face_content(this.__wbg_ptr);
|
|
286
|
+
deferred1_0 = ret[0];
|
|
287
|
+
deferred1_1 = ret[1];
|
|
288
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
289
|
+
} finally {
|
|
290
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* @param {number} css_id
|
|
295
|
+
* @param {string[]} class_name
|
|
296
|
+
* @returns {string}
|
|
297
|
+
*/
|
|
298
|
+
query_css_og_declarations_by_css_id(css_id, class_name) {
|
|
299
|
+
let deferred2_0;
|
|
300
|
+
let deferred2_1;
|
|
301
|
+
try {
|
|
302
|
+
const ptr0 = passArrayJsValueToWasm0(class_name, wasm.__wbindgen_malloc);
|
|
303
|
+
const len0 = WASM_VECTOR_LEN;
|
|
304
|
+
const ret = wasm.decodedstyledata_query_css_og_declarations_by_css_id(this.__wbg_ptr, css_id, ptr0, len0);
|
|
305
|
+
deferred2_0 = ret[0];
|
|
306
|
+
deferred2_1 = ret[1];
|
|
307
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
308
|
+
} finally {
|
|
309
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* @param {Uint8Array} buffer
|
|
314
|
+
* @param {string | null | undefined} entry_name
|
|
315
|
+
* @param {boolean} config_enable_css_selector
|
|
316
|
+
* @returns {Uint8Array}
|
|
317
|
+
*/
|
|
318
|
+
static decode_into(buffer, entry_name, config_enable_css_selector) {
|
|
319
|
+
var ptr0 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
+
var len0 = WASM_VECTOR_LEN;
|
|
321
|
+
const ret = wasm.decodedstyledata_decode_into(buffer, ptr0, len0, config_enable_css_selector);
|
|
322
|
+
if (ret[2]) {
|
|
323
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
324
|
+
}
|
|
325
|
+
return takeFromExternrefTable0(ret[0]);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* @param {RawStyleInfo} raw_style_info
|
|
329
|
+
* @param {boolean} config_enable_css_selector
|
|
330
|
+
* @param {string | null} [entry_name]
|
|
331
|
+
* @returns {Uint8Array}
|
|
332
|
+
*/
|
|
333
|
+
static encode_from_raw_style_info(raw_style_info, config_enable_css_selector, entry_name) {
|
|
334
|
+
_assertClass(raw_style_info, RawStyleInfo);
|
|
335
|
+
var ptr0 = raw_style_info.__destroy_into_raw();
|
|
336
|
+
var ptr1 = isLikeNone(entry_name) ? 0 : passStringToWasm0(entry_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
337
|
+
var len1 = WASM_VECTOR_LEN;
|
|
338
|
+
const ret = wasm.decodedstyledata_encode_from_raw_style_info(ptr0, config_enable_css_selector, ptr1, len1);
|
|
339
|
+
if (ret[2]) {
|
|
340
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
341
|
+
}
|
|
342
|
+
return takeFromExternrefTable0(ret[0]);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (Symbol.dispose) DecodedStyleData.prototype[Symbol.dispose] = DecodedStyleData.prototype.free;
|
|
346
|
+
|
|
347
|
+
const ElementTemplateSectionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
348
|
+
? { register: () => {}, unregister: () => {} }
|
|
349
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_elementtemplatesection_free(ptr >>> 0, 1));
|
|
350
|
+
|
|
351
|
+
export class ElementTemplateSection {
|
|
352
|
+
|
|
353
|
+
static __wrap(ptr) {
|
|
354
|
+
ptr = ptr >>> 0;
|
|
355
|
+
const obj = Object.create(ElementTemplateSection.prototype);
|
|
356
|
+
obj.__wbg_ptr = ptr;
|
|
357
|
+
ElementTemplateSectionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
358
|
+
return obj;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
__destroy_into_raw() {
|
|
362
|
+
const ptr = this.__wbg_ptr;
|
|
363
|
+
this.__wbg_ptr = 0;
|
|
364
|
+
ElementTemplateSectionFinalization.unregister(this);
|
|
365
|
+
return ptr;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
free() {
|
|
369
|
+
const ptr = this.__destroy_into_raw();
|
|
370
|
+
wasm.__wbg_elementtemplatesection_free(ptr, 0);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* @param {Uint8Array} buffer
|
|
374
|
+
* @returns {ElementTemplateSection}
|
|
375
|
+
*/
|
|
376
|
+
static from_encoded(buffer) {
|
|
377
|
+
const ret = wasm.elementtemplatesection_from_encoded(buffer);
|
|
378
|
+
if (ret[2]) {
|
|
379
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
380
|
+
}
|
|
381
|
+
return ElementTemplateSection.__wrap(ret[0]);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
if (Symbol.dispose) ElementTemplateSection.prototype[Symbol.dispose] = ElementTemplateSection.prototype.free;
|
|
385
|
+
|
|
386
|
+
const EventInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
387
|
+
? { register: () => {}, unregister: () => {} }
|
|
388
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_eventinfo_free(ptr >>> 0, 1));
|
|
389
|
+
/**
|
|
390
|
+
*
|
|
391
|
+
* * for return of __GetEvents
|
|
392
|
+
*
|
|
393
|
+
*/
|
|
394
|
+
export class EventInfo {
|
|
395
|
+
|
|
396
|
+
static __wrap(ptr) {
|
|
397
|
+
ptr = ptr >>> 0;
|
|
398
|
+
const obj = Object.create(EventInfo.prototype);
|
|
399
|
+
obj.__wbg_ptr = ptr;
|
|
400
|
+
EventInfoFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
401
|
+
return obj;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
__destroy_into_raw() {
|
|
405
|
+
const ptr = this.__wbg_ptr;
|
|
406
|
+
this.__wbg_ptr = 0;
|
|
407
|
+
EventInfoFinalization.unregister(this);
|
|
408
|
+
return ptr;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
free() {
|
|
412
|
+
const ptr = this.__destroy_into_raw();
|
|
413
|
+
wasm.__wbg_eventinfo_free(ptr, 0);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* @returns {string}
|
|
417
|
+
*/
|
|
418
|
+
get name() {
|
|
419
|
+
let deferred1_0;
|
|
420
|
+
let deferred1_1;
|
|
421
|
+
try {
|
|
422
|
+
const ret = wasm.__wbg_get_eventinfo_name(this.__wbg_ptr);
|
|
423
|
+
deferred1_0 = ret[0];
|
|
424
|
+
deferred1_1 = ret[1];
|
|
425
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
426
|
+
} finally {
|
|
427
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* @param {string} arg0
|
|
432
|
+
*/
|
|
433
|
+
set name(arg0) {
|
|
434
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
435
|
+
const len0 = WASM_VECTOR_LEN;
|
|
436
|
+
wasm.__wbg_set_eventinfo_name(this.__wbg_ptr, ptr0, len0);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* @returns {string}
|
|
440
|
+
*/
|
|
441
|
+
get type() {
|
|
442
|
+
let deferred1_0;
|
|
443
|
+
let deferred1_1;
|
|
444
|
+
try {
|
|
445
|
+
const ret = wasm.__wbg_get_eventinfo_type(this.__wbg_ptr);
|
|
446
|
+
deferred1_0 = ret[0];
|
|
447
|
+
deferred1_1 = ret[1];
|
|
448
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
449
|
+
} finally {
|
|
450
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* @param {string} arg0
|
|
455
|
+
*/
|
|
456
|
+
set type(arg0) {
|
|
457
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
458
|
+
const len0 = WASM_VECTOR_LEN;
|
|
459
|
+
wasm.__wbg_set_eventinfo_type(this.__wbg_ptr, ptr0, len0);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* @returns {any}
|
|
463
|
+
*/
|
|
464
|
+
get function() {
|
|
465
|
+
const ret = wasm.__wbg_get_eventinfo_function(this.__wbg_ptr);
|
|
466
|
+
return ret;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* @param {any} arg0
|
|
470
|
+
*/
|
|
471
|
+
set function(arg0) {
|
|
472
|
+
wasm.__wbg_set_eventinfo_function(this.__wbg_ptr, arg0);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if (Symbol.dispose) EventInfo.prototype[Symbol.dispose] = EventInfo.prototype.free;
|
|
476
|
+
|
|
477
|
+
const MainThreadWasmContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
478
|
+
? { register: () => {}, unregister: () => {} }
|
|
479
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_mainthreadwasmcontext_free(ptr >>> 0, 1));
|
|
480
|
+
|
|
481
|
+
export class MainThreadWasmContext {
|
|
482
|
+
|
|
483
|
+
__destroy_into_raw() {
|
|
484
|
+
const ptr = this.__wbg_ptr;
|
|
485
|
+
this.__wbg_ptr = 0;
|
|
486
|
+
MainThreadWasmContextFinalization.unregister(this);
|
|
487
|
+
return ptr;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
free() {
|
|
491
|
+
const ptr = this.__destroy_into_raw();
|
|
492
|
+
wasm.__wbg_mainthreadwasmcontext_free(ptr, 0);
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* @param {Uint32Array} elements_unique_id
|
|
496
|
+
* @param {number} css_id
|
|
497
|
+
*/
|
|
498
|
+
__wasm_set_css_id(elements_unique_id, css_id) {
|
|
499
|
+
const ptr0 = passArray32ToWasm0(elements_unique_id, wasm.__wbindgen_malloc);
|
|
500
|
+
const len0 = WASM_VECTOR_LEN;
|
|
501
|
+
wasm.mainthreadwasmcontext___wasm_set_css_id(this.__wbg_ptr, ptr0, len0, css_id);
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
*
|
|
505
|
+
* * The key could be string or number
|
|
506
|
+
* * The value could be string or number or null or undefined
|
|
507
|
+
*
|
|
508
|
+
* @param {HTMLElement} dom
|
|
509
|
+
* @param {string} key
|
|
510
|
+
* @param {string | null} [value]
|
|
511
|
+
*/
|
|
512
|
+
__wasm_AddInlineStyle_str_key(dom, key, value) {
|
|
513
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
514
|
+
const len0 = WASM_VECTOR_LEN;
|
|
515
|
+
var ptr1 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
516
|
+
var len1 = WASM_VECTOR_LEN;
|
|
517
|
+
wasm.mainthreadwasmcontext___wasm_AddInlineStyle_str_key(this.__wbg_ptr, dom, ptr0, len0, ptr1, len1);
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* @param {HTMLElement} dom
|
|
521
|
+
* @param {number} key
|
|
522
|
+
* @param {string | null} [value]
|
|
523
|
+
*/
|
|
524
|
+
__wasm_AddInlineStyle_number_key(dom, key, value) {
|
|
525
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
526
|
+
var len0 = WASM_VECTOR_LEN;
|
|
527
|
+
wasm.mainthreadwasmcontext___wasm_AddInlineStyle_number_key(this.__wbg_ptr, dom, key, ptr0, len0);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* @param {HTMLElement} dom
|
|
531
|
+
* @param {string} styles
|
|
532
|
+
* @returns {boolean}
|
|
533
|
+
*/
|
|
534
|
+
__wasm_SetInlineStyles(dom, styles) {
|
|
535
|
+
const ptr0 = passStringToWasm0(styles, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
536
|
+
const len0 = WASM_VECTOR_LEN;
|
|
537
|
+
const ret = wasm.mainthreadwasmcontext___wasm_SetInlineStyles(this.__wbg_ptr, dom, ptr0, len0);
|
|
538
|
+
return ret !== 0;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* @param {number} unique_id
|
|
542
|
+
* @param {string} event_type
|
|
543
|
+
* @param {string} event_name
|
|
544
|
+
* @param {string | null} [event_handler_identifier]
|
|
545
|
+
*/
|
|
546
|
+
__wasm_add_event_bts(unique_id, event_type, event_name, event_handler_identifier) {
|
|
547
|
+
const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
548
|
+
const len0 = WASM_VECTOR_LEN;
|
|
549
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
550
|
+
const len1 = WASM_VECTOR_LEN;
|
|
551
|
+
var ptr2 = isLikeNone(event_handler_identifier) ? 0 : passStringToWasm0(event_handler_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
552
|
+
var len2 = WASM_VECTOR_LEN;
|
|
553
|
+
wasm.mainthreadwasmcontext___wasm_add_event_bts(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* @param {number} unique_id
|
|
557
|
+
* @param {string} event_type
|
|
558
|
+
* @param {string} event_name
|
|
559
|
+
* @param {any | null} [event_handler_identifier]
|
|
560
|
+
*/
|
|
561
|
+
__wasm_add_event_run_worklet(unique_id, event_type, event_name, event_handler_identifier) {
|
|
562
|
+
const ptr0 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
563
|
+
const len0 = WASM_VECTOR_LEN;
|
|
564
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
565
|
+
const len1 = WASM_VECTOR_LEN;
|
|
566
|
+
wasm.mainthreadwasmcontext___wasm_add_event_run_worklet(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1, isLikeNone(event_handler_identifier) ? 0 : addToExternrefTable0(event_handler_identifier));
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* @param {number} unique_id
|
|
570
|
+
* @param {string} event_name
|
|
571
|
+
* @param {string} event_type
|
|
572
|
+
* @returns {any}
|
|
573
|
+
*/
|
|
574
|
+
__GetEvent(unique_id, event_name, event_type) {
|
|
575
|
+
const ptr0 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
576
|
+
const len0 = WASM_VECTOR_LEN;
|
|
577
|
+
const ptr1 = passStringToWasm0(event_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
578
|
+
const len1 = WASM_VECTOR_LEN;
|
|
579
|
+
const ret = wasm.mainthreadwasmcontext___GetEvent(this.__wbg_ptr, unique_id, ptr0, len0, ptr1, len1);
|
|
580
|
+
return ret;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* @param {number} unique_id
|
|
584
|
+
* @returns {EventInfo[]}
|
|
585
|
+
*/
|
|
586
|
+
__GetEvents(unique_id) {
|
|
587
|
+
const ret = wasm.mainthreadwasmcontext___GetEvents(this.__wbg_ptr, unique_id);
|
|
588
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
589
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
590
|
+
return v1;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* @param {Uint32Array} bubble_unique_id_path
|
|
594
|
+
* @param {string} event_name
|
|
595
|
+
* @param {boolean} is_capture
|
|
596
|
+
* @param {any} serialized_event
|
|
597
|
+
* @returns {boolean}
|
|
598
|
+
*/
|
|
599
|
+
dispatch_event_by_path(bubble_unique_id_path, event_name, is_capture, serialized_event) {
|
|
600
|
+
const ptr0 = passArray32ToWasm0(bubble_unique_id_path, wasm.__wbindgen_malloc);
|
|
601
|
+
const len0 = WASM_VECTOR_LEN;
|
|
602
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
603
|
+
const len1 = WASM_VECTOR_LEN;
|
|
604
|
+
const ret = wasm.mainthreadwasmcontext_dispatch_event_by_path(this.__wbg_ptr, ptr0, len0, ptr1, len1, is_capture, serialized_event);
|
|
605
|
+
return ret !== 0;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* @param {any} event
|
|
609
|
+
* @param {Uint32Array} bubble_unique_id_path
|
|
610
|
+
* @param {string} event_name
|
|
611
|
+
*/
|
|
612
|
+
__wasm_commonEventHandler(event, bubble_unique_id_path, event_name) {
|
|
613
|
+
const ptr0 = passArray32ToWasm0(bubble_unique_id_path, wasm.__wbindgen_malloc);
|
|
614
|
+
const len0 = WASM_VECTOR_LEN;
|
|
615
|
+
const ptr1 = passStringToWasm0(event_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
616
|
+
const len1 = WASM_VECTOR_LEN;
|
|
617
|
+
wasm.mainthreadwasmcontext___wasm_commonEventHandler(this.__wbg_ptr, event, ptr0, len0, ptr1, len1);
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* @param {Document} document
|
|
621
|
+
* @param {Node} root_node
|
|
622
|
+
* @param {any} mts_binding
|
|
623
|
+
* @param {any} unique_id_symbol
|
|
624
|
+
* @param {boolean} config_enable_css_selector
|
|
625
|
+
*/
|
|
626
|
+
constructor(document, root_node, mts_binding, unique_id_symbol, config_enable_css_selector) {
|
|
627
|
+
const ret = wasm.mainthreadwasmcontext_new(document, root_node, mts_binding, unique_id_symbol, config_enable_css_selector);
|
|
628
|
+
this.__wbg_ptr = ret >>> 0;
|
|
629
|
+
MainThreadWasmContextFinalization.register(this, this.__wbg_ptr, this);
|
|
630
|
+
return this;
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* @param {number} unique_id
|
|
634
|
+
*/
|
|
635
|
+
__wasm_set_page_element_unique_id(unique_id) {
|
|
636
|
+
wasm.mainthreadwasmcontext___wasm_set_page_element_unique_id(this.__wbg_ptr, unique_id);
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* @param {number} parent_component_unique_id
|
|
640
|
+
* @param {HTMLElement} dom
|
|
641
|
+
* @param {number | null} [css_id]
|
|
642
|
+
* @param {string | null} [component_id]
|
|
643
|
+
* @returns {number}
|
|
644
|
+
*/
|
|
645
|
+
__CreateElementCommon(parent_component_unique_id, dom, css_id, component_id) {
|
|
646
|
+
var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
647
|
+
var len0 = WASM_VECTOR_LEN;
|
|
648
|
+
const ret = wasm.mainthreadwasmcontext___CreateElementCommon(this.__wbg_ptr, parent_component_unique_id, dom, isLikeNone(css_id) ? 0x100000001 : (css_id) >> 0, ptr0, len0);
|
|
649
|
+
return ret >>> 0;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* @returns {string[]}
|
|
653
|
+
*/
|
|
654
|
+
__wasm_take_timing_flags() {
|
|
655
|
+
const ret = wasm.mainthreadwasmcontext___wasm_take_timing_flags(this.__wbg_ptr);
|
|
656
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
657
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
658
|
+
return v1;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* @param {string} component_id
|
|
662
|
+
* @returns {number | undefined}
|
|
663
|
+
*/
|
|
664
|
+
__wasm_get_unique_id_by_component_id(component_id) {
|
|
665
|
+
const ptr0 = passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
666
|
+
const len0 = WASM_VECTOR_LEN;
|
|
667
|
+
const ret = wasm.mainthreadwasmcontext___wasm_get_unique_id_by_component_id(this.__wbg_ptr, ptr0, len0);
|
|
668
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* @param {number} unique_id
|
|
672
|
+
* @returns {number | undefined}
|
|
673
|
+
*/
|
|
674
|
+
__wasm_get_css_id_by_unique_id(unique_id) {
|
|
675
|
+
const ret = wasm.mainthreadwasmcontext___wasm_get_css_id_by_unique_id(this.__wbg_ptr, unique_id);
|
|
676
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* @param {number} parent_component_unique_id
|
|
680
|
+
* @param {string} template_url
|
|
681
|
+
* @param {string} element_template_name
|
|
682
|
+
* @param {ElementTemplateSection} element_template_section
|
|
683
|
+
* @returns {Element}
|
|
684
|
+
*/
|
|
685
|
+
_wasm_elementFromBinary(parent_component_unique_id, template_url, element_template_name, element_template_section) {
|
|
686
|
+
const ptr0 = passStringToWasm0(template_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
687
|
+
const len0 = WASM_VECTOR_LEN;
|
|
688
|
+
const ptr1 = passStringToWasm0(element_template_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
689
|
+
const len1 = WASM_VECTOR_LEN;
|
|
690
|
+
_assertClass(element_template_section, ElementTemplateSection);
|
|
691
|
+
const ret = wasm.mainthreadwasmcontext__wasm_elementFromBinary(this.__wbg_ptr, parent_component_unique_id, ptr0, len0, ptr1, len1, element_template_section.__wbg_ptr);
|
|
692
|
+
if (ret[2]) {
|
|
693
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
694
|
+
}
|
|
695
|
+
return takeFromExternrefTable0(ret[0]);
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* @param {number} unique_id
|
|
699
|
+
* @returns {string | undefined}
|
|
700
|
+
*/
|
|
701
|
+
__GetComponentID(unique_id) {
|
|
702
|
+
const ret = wasm.mainthreadwasmcontext___GetComponentID(this.__wbg_ptr, unique_id);
|
|
703
|
+
if (ret[3]) {
|
|
704
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
705
|
+
}
|
|
706
|
+
let v1;
|
|
707
|
+
if (ret[0] !== 0) {
|
|
708
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
709
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
710
|
+
}
|
|
711
|
+
return v1;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* @param {number} unique_id
|
|
715
|
+
* @returns {object | undefined}
|
|
716
|
+
*/
|
|
717
|
+
__GetElementConfig(unique_id) {
|
|
718
|
+
const ret = wasm.mainthreadwasmcontext___GetElementConfig(this.__wbg_ptr, unique_id);
|
|
719
|
+
if (ret[2]) {
|
|
720
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
721
|
+
}
|
|
722
|
+
return takeFromExternrefTable0(ret[0]);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
*
|
|
726
|
+
* * key: String
|
|
727
|
+
* * value: stringifyed js value
|
|
728
|
+
*
|
|
729
|
+
* @param {number} unique_id
|
|
730
|
+
* @param {object} config
|
|
731
|
+
*/
|
|
732
|
+
__SetConfig(unique_id, config) {
|
|
733
|
+
const ret = wasm.mainthreadwasmcontext___SetConfig(this.__wbg_ptr, unique_id, config);
|
|
734
|
+
if (ret[1]) {
|
|
735
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* @param {number} unique_id
|
|
740
|
+
* @returns {object}
|
|
741
|
+
*/
|
|
742
|
+
__GetConfig(unique_id) {
|
|
743
|
+
const ret = wasm.mainthreadwasmcontext___GetConfig(this.__wbg_ptr, unique_id);
|
|
744
|
+
if (ret[2]) {
|
|
745
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
746
|
+
}
|
|
747
|
+
return takeFromExternrefTable0(ret[0]);
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* @param {number} unique_id
|
|
751
|
+
* @param {string | null} [component_id]
|
|
752
|
+
*/
|
|
753
|
+
__UpdateComponentID(unique_id, component_id) {
|
|
754
|
+
var ptr0 = isLikeNone(component_id) ? 0 : passStringToWasm0(component_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
755
|
+
var len0 = WASM_VECTOR_LEN;
|
|
756
|
+
const ret = wasm.mainthreadwasmcontext___UpdateComponentID(this.__wbg_ptr, unique_id, ptr0, len0);
|
|
757
|
+
if (ret[1]) {
|
|
758
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* @param {number} unique_id
|
|
763
|
+
* @param {HTMLElement} dom
|
|
764
|
+
* @param {object} new_dataset
|
|
765
|
+
*/
|
|
766
|
+
__SetDataset(unique_id, dom, new_dataset) {
|
|
767
|
+
const ret = wasm.mainthreadwasmcontext___SetDataset(this.__wbg_ptr, unique_id, dom, new_dataset);
|
|
768
|
+
if (ret[1]) {
|
|
769
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* @param {number} unique_id
|
|
774
|
+
* @param {any} key
|
|
775
|
+
* @param {any} value
|
|
776
|
+
*/
|
|
777
|
+
__AddDataset(unique_id, key, value) {
|
|
778
|
+
const ret = wasm.mainthreadwasmcontext___AddDataset(this.__wbg_ptr, unique_id, key, value);
|
|
779
|
+
if (ret[1]) {
|
|
780
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* @param {number} unique_id
|
|
785
|
+
* @returns {object}
|
|
786
|
+
*/
|
|
787
|
+
__GetDataset(unique_id) {
|
|
788
|
+
const ret = wasm.mainthreadwasmcontext___GetDataset(this.__wbg_ptr, unique_id);
|
|
789
|
+
if (ret[2]) {
|
|
790
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
791
|
+
}
|
|
792
|
+
return takeFromExternrefTable0(ret[0]);
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* @param {number} unique_id
|
|
796
|
+
* @param {string} key
|
|
797
|
+
* @returns {any}
|
|
798
|
+
*/
|
|
799
|
+
__GetDataByKey(unique_id, key) {
|
|
800
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
801
|
+
const len0 = WASM_VECTOR_LEN;
|
|
802
|
+
const ret = wasm.mainthreadwasmcontext___GetDataByKey(this.__wbg_ptr, unique_id, ptr0, len0);
|
|
803
|
+
if (ret[2]) {
|
|
804
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
805
|
+
}
|
|
806
|
+
return takeFromExternrefTable0(ret[0]);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
if (Symbol.dispose) MainThreadWasmContext.prototype[Symbol.dispose] = MainThreadWasmContext.prototype.free;
|
|
810
|
+
|
|
811
|
+
const RawStyleInfoFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
812
|
+
? { register: () => {}, unregister: () => {} }
|
|
813
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rawstyleinfo_free(ptr >>> 0, 1));
|
|
814
|
+
/**
|
|
815
|
+
*
|
|
816
|
+
* * key: cssId
|
|
817
|
+
* * value: StyleSheet
|
|
818
|
+
*
|
|
819
|
+
*/
|
|
820
|
+
export class RawStyleInfo {
|
|
821
|
+
|
|
822
|
+
__destroy_into_raw() {
|
|
823
|
+
const ptr = this.__wbg_ptr;
|
|
824
|
+
this.__wbg_ptr = 0;
|
|
825
|
+
RawStyleInfoFinalization.unregister(this);
|
|
826
|
+
return ptr;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
free() {
|
|
830
|
+
const ptr = this.__destroy_into_raw();
|
|
831
|
+
wasm.__wbg_rawstyleinfo_free(ptr, 0);
|
|
832
|
+
}
|
|
833
|
+
constructor() {
|
|
834
|
+
const ret = wasm.rawstyleinfo_new();
|
|
835
|
+
this.__wbg_ptr = ret >>> 0;
|
|
836
|
+
RawStyleInfoFinalization.register(this, this.__wbg_ptr, this);
|
|
837
|
+
return this;
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
*
|
|
841
|
+
* * Appends an import to the stylesheet identified by `css_id`.
|
|
842
|
+
* * If the stylesheet does not exist, it is created.
|
|
843
|
+
* * @param css_id - The ID of the CSS file.
|
|
844
|
+
* * @param import_css_id - The ID of the imported CSS file.
|
|
845
|
+
*
|
|
846
|
+
* @param {number} css_id
|
|
847
|
+
* @param {number} import_css_id
|
|
848
|
+
*/
|
|
849
|
+
append_import(css_id, import_css_id) {
|
|
850
|
+
wasm.rawstyleinfo_append_import(this.__wbg_ptr, css_id, import_css_id);
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
*
|
|
854
|
+
* * Pushes a rule to the stylesheet identified by `css_id`.
|
|
855
|
+
* * If the stylesheet does not exist, it is created.
|
|
856
|
+
* * @param css_id - The ID of the CSS file.
|
|
857
|
+
* * @param rule - The rule to append.
|
|
858
|
+
*
|
|
859
|
+
* @param {number} css_id
|
|
860
|
+
* @param {Rule} rule
|
|
861
|
+
*/
|
|
862
|
+
push_rule(css_id, rule) {
|
|
863
|
+
_assertClass(rule, Rule);
|
|
864
|
+
var ptr0 = rule.__destroy_into_raw();
|
|
865
|
+
wasm.rawstyleinfo_push_rule(this.__wbg_ptr, css_id, ptr0);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
if (Symbol.dispose) RawStyleInfo.prototype[Symbol.dispose] = RawStyleInfo.prototype.free;
|
|
869
|
+
|
|
870
|
+
const RuleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
871
|
+
? { register: () => {}, unregister: () => {} }
|
|
872
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rule_free(ptr >>> 0, 1));
|
|
873
|
+
|
|
874
|
+
export class Rule {
|
|
875
|
+
|
|
876
|
+
__destroy_into_raw() {
|
|
877
|
+
const ptr = this.__wbg_ptr;
|
|
878
|
+
this.__wbg_ptr = 0;
|
|
879
|
+
RuleFinalization.unregister(this);
|
|
880
|
+
return ptr;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
free() {
|
|
884
|
+
const ptr = this.__destroy_into_raw();
|
|
885
|
+
wasm.__wbg_rule_free(ptr, 0);
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
*
|
|
889
|
+
* * Creates a new Rule with the specified type.
|
|
890
|
+
* * @param rule_type - The type of the rule (e.g., "StyleRule", "FontFaceRule", "KeyframesRule").
|
|
891
|
+
*
|
|
892
|
+
* @param {string} rule_type
|
|
893
|
+
*/
|
|
894
|
+
constructor(rule_type) {
|
|
895
|
+
const ptr0 = passStringToWasm0(rule_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
896
|
+
const len0 = WASM_VECTOR_LEN;
|
|
897
|
+
const ret = wasm.rule_new(ptr0, len0);
|
|
898
|
+
if (ret[2]) {
|
|
899
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
900
|
+
}
|
|
901
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
902
|
+
RuleFinalization.register(this, this.__wbg_ptr, this);
|
|
903
|
+
return this;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
*
|
|
907
|
+
* * Sets the prelude for the rule.
|
|
908
|
+
* * @param prelude - The prelude to set (SelectorList or KeyFramesPrelude).
|
|
909
|
+
*
|
|
910
|
+
* @param {RulePrelude} prelude
|
|
911
|
+
*/
|
|
912
|
+
set_prelude(prelude) {
|
|
913
|
+
_assertClass(prelude, RulePrelude);
|
|
914
|
+
var ptr0 = prelude.__destroy_into_raw();
|
|
915
|
+
wasm.rule_set_prelude(this.__wbg_ptr, ptr0);
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
*
|
|
919
|
+
* * Pushes a declaration to the rule's declaration block.
|
|
920
|
+
* * @param property_name - The property name.
|
|
921
|
+
* * @param value - The property value.
|
|
922
|
+
*
|
|
923
|
+
* @param {string} property_name
|
|
924
|
+
* @param {string} value
|
|
925
|
+
*/
|
|
926
|
+
push_declaration(property_name, value) {
|
|
927
|
+
const ptr0 = passStringToWasm0(property_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
928
|
+
const len0 = WASM_VECTOR_LEN;
|
|
929
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
930
|
+
const len1 = WASM_VECTOR_LEN;
|
|
931
|
+
wasm.rule_push_declaration(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
*
|
|
935
|
+
* * Pushes a nested rule to the rule.
|
|
936
|
+
* * @param rule - The nested rule to add.
|
|
937
|
+
*
|
|
938
|
+
* @param {Rule} rule
|
|
939
|
+
*/
|
|
940
|
+
push_rule_children(rule) {
|
|
941
|
+
_assertClass(rule, Rule);
|
|
942
|
+
var ptr0 = rule.__destroy_into_raw();
|
|
943
|
+
wasm.rule_push_rule_children(this.__wbg_ptr, ptr0);
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
if (Symbol.dispose) Rule.prototype[Symbol.dispose] = Rule.prototype.free;
|
|
947
|
+
|
|
948
|
+
const RulePreludeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
949
|
+
? { register: () => {}, unregister: () => {} }
|
|
950
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ruleprelude_free(ptr >>> 0, 1));
|
|
951
|
+
/**
|
|
952
|
+
*
|
|
953
|
+
* * Either SelectorList or KeyFramesPrelude
|
|
954
|
+
* * Depending on the RuleType
|
|
955
|
+
* * If it is SelectorList, then selectors is a list of Selector
|
|
956
|
+
* * If it is KeyFramesPrelude, then selectors has only one selector which is Prelude text, its simple_selectors is empty
|
|
957
|
+
* * If the parent is FontFace, then selectors is empty
|
|
958
|
+
*
|
|
959
|
+
*/
|
|
960
|
+
export class RulePrelude {
|
|
961
|
+
|
|
962
|
+
__destroy_into_raw() {
|
|
963
|
+
const ptr = this.__wbg_ptr;
|
|
964
|
+
this.__wbg_ptr = 0;
|
|
965
|
+
RulePreludeFinalization.unregister(this);
|
|
966
|
+
return ptr;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
free() {
|
|
970
|
+
const ptr = this.__destroy_into_raw();
|
|
971
|
+
wasm.__wbg_ruleprelude_free(ptr, 0);
|
|
972
|
+
}
|
|
973
|
+
constructor() {
|
|
974
|
+
const ret = wasm.ruleprelude_new();
|
|
975
|
+
this.__wbg_ptr = ret >>> 0;
|
|
976
|
+
RulePreludeFinalization.register(this, this.__wbg_ptr, this);
|
|
977
|
+
return this;
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
*
|
|
981
|
+
* * Pushes a selector to the list.
|
|
982
|
+
* * @param selector - The selector to add.
|
|
983
|
+
*
|
|
984
|
+
* @param {Selector} selector
|
|
985
|
+
*/
|
|
986
|
+
push_selector(selector) {
|
|
987
|
+
_assertClass(selector, Selector);
|
|
988
|
+
var ptr0 = selector.__destroy_into_raw();
|
|
989
|
+
wasm.ruleprelude_push_selector(this.__wbg_ptr, ptr0);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
if (Symbol.dispose) RulePrelude.prototype[Symbol.dispose] = RulePrelude.prototype.free;
|
|
993
|
+
|
|
994
|
+
const SelectorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
995
|
+
? { register: () => {}, unregister: () => {} }
|
|
996
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_selector_free(ptr >>> 0, 1));
|
|
997
|
+
|
|
998
|
+
export class Selector {
|
|
999
|
+
|
|
1000
|
+
__destroy_into_raw() {
|
|
1001
|
+
const ptr = this.__wbg_ptr;
|
|
1002
|
+
this.__wbg_ptr = 0;
|
|
1003
|
+
SelectorFinalization.unregister(this);
|
|
1004
|
+
return ptr;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
free() {
|
|
1008
|
+
const ptr = this.__destroy_into_raw();
|
|
1009
|
+
wasm.__wbg_selector_free(ptr, 0);
|
|
1010
|
+
}
|
|
1011
|
+
constructor() {
|
|
1012
|
+
const ret = wasm.selector_new();
|
|
1013
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1014
|
+
SelectorFinalization.register(this, this.__wbg_ptr, this);
|
|
1015
|
+
return this;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
*
|
|
1019
|
+
* * Pushes a selector section to the selector.
|
|
1020
|
+
* * @param selector_type - The type of the selector section (e.g., "ClassSelector", "IdSelector").
|
|
1021
|
+
* * @param value - The value of the selector section.
|
|
1022
|
+
*
|
|
1023
|
+
* @param {string} selector_type
|
|
1024
|
+
* @param {string} value
|
|
1025
|
+
*/
|
|
1026
|
+
push_one_selector_section(selector_type, value) {
|
|
1027
|
+
const ptr0 = passStringToWasm0(selector_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1028
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1029
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1030
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1031
|
+
const ret = wasm.selector_push_one_selector_section(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1032
|
+
if (ret[1]) {
|
|
1033
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
if (Symbol.dispose) Selector.prototype[Symbol.dispose] = Selector.prototype.free;
|
|
1038
|
+
|
|
1039
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
1040
|
+
|
|
1041
|
+
async function __wbg_load(module, imports) {
|
|
1042
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1043
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1044
|
+
try {
|
|
1045
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1046
|
+
|
|
1047
|
+
} catch (e) {
|
|
1048
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
1049
|
+
|
|
1050
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1051
|
+
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);
|
|
1052
|
+
|
|
1053
|
+
} else {
|
|
1054
|
+
throw e;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
const bytes = await module.arrayBuffer();
|
|
1060
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1061
|
+
|
|
1062
|
+
} else {
|
|
1063
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1064
|
+
|
|
1065
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1066
|
+
return { instance, module };
|
|
1067
|
+
|
|
1068
|
+
} else {
|
|
1069
|
+
return instance;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
function __wbg_get_imports() {
|
|
1075
|
+
const imports = {};
|
|
1076
|
+
imports.wbg = {};
|
|
1077
|
+
imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
1078
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1079
|
+
return ret;
|
|
1080
|
+
};
|
|
1081
|
+
imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
1082
|
+
const ret = debugString(arg1);
|
|
1083
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1084
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1085
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1086
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1087
|
+
};
|
|
1088
|
+
imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
|
|
1089
|
+
const ret = arg0 === null;
|
|
1090
|
+
return ret;
|
|
1091
|
+
};
|
|
1092
|
+
imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
1093
|
+
const ret = arg0 === undefined;
|
|
1094
|
+
return ret;
|
|
1095
|
+
};
|
|
1096
|
+
imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
|
|
1097
|
+
const ret = arg0 === arg1;
|
|
1098
|
+
return ret;
|
|
1099
|
+
};
|
|
1100
|
+
imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
|
|
1101
|
+
const obj = arg1;
|
|
1102
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1103
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1104
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1105
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1106
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1107
|
+
};
|
|
1108
|
+
imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
1109
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1110
|
+
};
|
|
1111
|
+
imports.wbg.__wbg_addEventListener_509b0778ff0f5d80 = function(arg0, arg1, arg2) {
|
|
1112
|
+
arg0.addEventListener(getStringFromWasm0(arg1, arg2));
|
|
1113
|
+
};
|
|
1114
|
+
imports.wbg.__wbg_appendChild_aec7a8a4bd6cac61 = function() { return handleError(function (arg0, arg1) {
|
|
1115
|
+
const ret = arg0.appendChild(arg1);
|
|
1116
|
+
return ret;
|
|
1117
|
+
}, arguments) };
|
|
1118
|
+
imports.wbg.__wbg_assign_322cd025d1feae78 = function(arg0, arg1) {
|
|
1119
|
+
const ret = Object.assign(arg0, arg1);
|
|
1120
|
+
return ret;
|
|
1121
|
+
};
|
|
1122
|
+
imports.wbg.__wbg_cloneNode_4ff138eda9fcd474 = function() { return handleError(function (arg0, arg1) {
|
|
1123
|
+
const ret = arg0.cloneNode(arg1 !== 0);
|
|
1124
|
+
return ret;
|
|
1125
|
+
}, arguments) };
|
|
1126
|
+
imports.wbg.__wbg_content_a7b60fc3c1ac64bd = function(arg0) {
|
|
1127
|
+
const ret = arg0.content;
|
|
1128
|
+
return ret;
|
|
1129
|
+
};
|
|
1130
|
+
imports.wbg.__wbg_createElement_964ab674a0176cd8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1131
|
+
const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
|
|
1132
|
+
return ret;
|
|
1133
|
+
}, arguments) };
|
|
1134
|
+
imports.wbg.__wbg_disableElementEvent_54563f003ce6f005 = function(arg0, arg1, arg2, arg3) {
|
|
1135
|
+
arg0.disableElementEvent(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
|
|
1136
|
+
};
|
|
1137
|
+
imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
1138
|
+
const ret = arg0.done;
|
|
1139
|
+
return ret;
|
|
1140
|
+
};
|
|
1141
|
+
imports.wbg.__wbg_enableElementEvent_b56814551effb38c = function(arg0, arg1, arg2, arg3) {
|
|
1142
|
+
arg0.enableElementEvent(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
|
|
1143
|
+
};
|
|
1144
|
+
imports.wbg.__wbg_eventinfo_new = function(arg0) {
|
|
1145
|
+
const ret = EventInfo.__wrap(arg0);
|
|
1146
|
+
return ret;
|
|
1147
|
+
};
|
|
1148
|
+
imports.wbg.__wbg_firstChild_dab0d4655f86bce5 = function(arg0) {
|
|
1149
|
+
const ret = arg0.firstChild;
|
|
1150
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1151
|
+
};
|
|
1152
|
+
imports.wbg.__wbg_getAttribute_a0d65fabc2f0d559 = function(arg0, arg1, arg2, arg3) {
|
|
1153
|
+
const ret = arg1.getAttribute(getStringFromWasm0(arg2, arg3));
|
|
1154
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1155
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1156
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1157
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1158
|
+
};
|
|
1159
|
+
imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
1160
|
+
const ret = arg0[arg1 >>> 0];
|
|
1161
|
+
return ret;
|
|
1162
|
+
};
|
|
1163
|
+
imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
|
|
1164
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1165
|
+
return ret;
|
|
1166
|
+
}, arguments) };
|
|
1167
|
+
imports.wbg.__wbg_has_787fafc980c3ccdb = function() { return handleError(function (arg0, arg1) {
|
|
1168
|
+
const ret = Reflect.has(arg0, arg1);
|
|
1169
|
+
return ret;
|
|
1170
|
+
}, arguments) };
|
|
1171
|
+
imports.wbg.__wbg_keys_b4d27b02ad14f4be = function(arg0) {
|
|
1172
|
+
const ret = Object.keys(arg0);
|
|
1173
|
+
return ret;
|
|
1174
|
+
};
|
|
1175
|
+
imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
|
|
1176
|
+
const ret = arg0.length;
|
|
1177
|
+
return ret;
|
|
1178
|
+
};
|
|
1179
|
+
imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
1180
|
+
const ret = arg0.length;
|
|
1181
|
+
return ret;
|
|
1182
|
+
};
|
|
1183
|
+
imports.wbg.__wbg_loadInternalWebElement_8cae19b87cc26220 = function(arg0, arg1) {
|
|
1184
|
+
arg0.loadInternalWebElement(arg1 >>> 0);
|
|
1185
|
+
};
|
|
1186
|
+
imports.wbg.__wbg_loadUnknownElement_762c72a091c9dc9e = function(arg0, arg1, arg2) {
|
|
1187
|
+
arg0.loadUnknownElement(getStringFromWasm0(arg1, arg2));
|
|
1188
|
+
};
|
|
1189
|
+
imports.wbg.__wbg_markExposureRelatedElementByUniqueId_c37ed9a4da654c4e = function(arg0, arg1, arg2) {
|
|
1190
|
+
arg0.markExposureRelatedElementByUniqueId(arg1 >>> 0, arg2 !== 0);
|
|
1191
|
+
};
|
|
1192
|
+
imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
|
|
1193
|
+
const ret = new Object();
|
|
1194
|
+
return ret;
|
|
1195
|
+
};
|
|
1196
|
+
imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
|
|
1197
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1198
|
+
return ret;
|
|
1199
|
+
};
|
|
1200
|
+
imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
|
|
1201
|
+
const ret = arg0.next();
|
|
1202
|
+
return ret;
|
|
1203
|
+
}, arguments) };
|
|
1204
|
+
imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
1205
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1206
|
+
};
|
|
1207
|
+
imports.wbg.__wbg_publishEvent_9003166a9524dc81 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
1208
|
+
arg0.publishEvent(getStringFromWasm0(arg1, arg2), arg3 === 0 ? undefined : getStringFromWasm0(arg3, arg4), arg5, arg6 >>> 0, arg7, arg8 >>> 0, arg9);
|
|
1209
|
+
};
|
|
1210
|
+
imports.wbg.__wbg_querySelectorAll_28da62a91120d3e9 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1211
|
+
const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
|
|
1212
|
+
return ret;
|
|
1213
|
+
}, arguments) };
|
|
1214
|
+
imports.wbg.__wbg_removeAttribute_993c4bef8df6e74d = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1215
|
+
arg0.removeAttribute(getStringFromWasm0(arg1, arg2));
|
|
1216
|
+
}, arguments) };
|
|
1217
|
+
imports.wbg.__wbg_removeProperty_f76e32d12224854d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1218
|
+
const ret = arg1.removeProperty(getStringFromWasm0(arg2, arg3));
|
|
1219
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1220
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1221
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1222
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1223
|
+
}, arguments) };
|
|
1224
|
+
imports.wbg.__wbg_runWorklet_6d04359b8a8c370f = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1225
|
+
arg0.runWorklet(arg1, arg2, arg3 >>> 0, arg4, arg5 >>> 0, arg6);
|
|
1226
|
+
};
|
|
1227
|
+
imports.wbg.__wbg_setAttribute_9bad76f39609daac = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1228
|
+
arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1229
|
+
}, arguments) };
|
|
1230
|
+
imports.wbg.__wbg_setProperty_7b188d7e71d4aca8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1231
|
+
arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1232
|
+
}, arguments) };
|
|
1233
|
+
imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1234
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1235
|
+
return ret;
|
|
1236
|
+
}, arguments) };
|
|
1237
|
+
imports.wbg.__wbg_style_763a7ccfd47375da = function(arg0) {
|
|
1238
|
+
const ret = arg0.style;
|
|
1239
|
+
return ret;
|
|
1240
|
+
};
|
|
1241
|
+
imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
|
|
1242
|
+
const ret = arg0.value;
|
|
1243
|
+
return ret;
|
|
1244
|
+
};
|
|
1245
|
+
imports.wbg.__wbg_values_fea03b2a33fe593c = function(arg0) {
|
|
1246
|
+
const ret = arg0.values();
|
|
1247
|
+
return ret;
|
|
1248
|
+
};
|
|
1249
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1250
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1251
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1252
|
+
return ret;
|
|
1253
|
+
};
|
|
1254
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1255
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1256
|
+
const ret = arg0;
|
|
1257
|
+
return ret;
|
|
1258
|
+
};
|
|
1259
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1260
|
+
const table = wasm.__wbindgen_externrefs;
|
|
1261
|
+
const offset = table.grow(4);
|
|
1262
|
+
table.set(0, undefined);
|
|
1263
|
+
table.set(offset + 0, undefined);
|
|
1264
|
+
table.set(offset + 1, null);
|
|
1265
|
+
table.set(offset + 2, true);
|
|
1266
|
+
table.set(offset + 3, false);
|
|
1267
|
+
;
|
|
1268
|
+
};
|
|
1269
|
+
imports.wbg.__wbindgen_object_is_undefined = function(arg0) {
|
|
1270
|
+
const ret = arg0 === undefined;
|
|
1271
|
+
return ret;
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1274
|
+
return imports;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
function __wbg_finalize_init(instance, module) {
|
|
1278
|
+
wasm = instance.exports;
|
|
1279
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
1280
|
+
cachedDataViewMemory0 = null;
|
|
1281
|
+
cachedUint32ArrayMemory0 = null;
|
|
1282
|
+
cachedUint8ArrayMemory0 = null;
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
wasm.__wbindgen_start();
|
|
1286
|
+
return wasm;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
function initSync(module) {
|
|
1290
|
+
if (wasm !== undefined) return wasm;
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
if (typeof module !== 'undefined') {
|
|
1294
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1295
|
+
({module} = module)
|
|
1296
|
+
} else {
|
|
1297
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
const imports = __wbg_get_imports();
|
|
1302
|
+
|
|
1303
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
1304
|
+
module = new WebAssembly.Module(module);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
1308
|
+
|
|
1309
|
+
return __wbg_finalize_init(instance, module);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
async function __wbg_init(module_or_path) {
|
|
1313
|
+
if (wasm !== undefined) return wasm;
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
if (typeof module_or_path !== 'undefined') {
|
|
1317
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1318
|
+
({module_or_path} = module_or_path)
|
|
1319
|
+
} else {
|
|
1320
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
if (typeof module_or_path === 'undefined') {
|
|
1325
|
+
module_or_path = new URL('client_debug_bg.wasm', import.meta.url);
|
|
1326
|
+
}
|
|
1327
|
+
const imports = __wbg_get_imports();
|
|
1328
|
+
|
|
1329
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
1330
|
+
module_or_path = fetch(module_or_path);
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1334
|
+
|
|
1335
|
+
return __wbg_finalize_init(instance, module);
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export { initSync };
|
|
1339
|
+
export default __wbg_init;
|