@xcodekit/xcode-wasm 0.6.0 → 0.6.2

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/xcode_bg.js DELETED
@@ -1,1113 +0,0 @@
1
- /**
2
- * High-level project manipulation — stays in WASM memory.
3
- */
4
- export class XcodeProject {
5
- __destroy_into_raw() {
6
- const ptr = this.__wbg_ptr;
7
- this.__wbg_ptr = 0;
8
- XcodeProjectFinalization.unregister(this);
9
- return ptr;
10
- }
11
- free() {
12
- const ptr = this.__destroy_into_raw();
13
- wasm.__wbg_xcodeproject_free(ptr, 0);
14
- }
15
- /**
16
- * @param {string} phase_uuid
17
- * @param {string} file_ref_uuid
18
- * @returns {string | undefined}
19
- */
20
- addBuildFile(phase_uuid, file_ref_uuid) {
21
- try {
22
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
23
- const ptr0 = passStringToWasm0(phase_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
24
- const len0 = WASM_VECTOR_LEN;
25
- const ptr1 = passStringToWasm0(file_ref_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
26
- const len1 = WASM_VECTOR_LEN;
27
- wasm.xcodeproject_addBuildFile(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
28
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
29
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
30
- let v3;
31
- if (r0 !== 0) {
32
- v3 = getStringFromWasm0(r0, r1).slice();
33
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
34
- }
35
- return v3;
36
- } finally {
37
- wasm.__wbindgen_add_to_stack_pointer(16);
38
- }
39
- }
40
- /**
41
- * @param {string} target_uuid
42
- * @param {string} depends_on
43
- * @returns {string | undefined}
44
- */
45
- addDependency(target_uuid, depends_on) {
46
- try {
47
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
48
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
49
- const len0 = WASM_VECTOR_LEN;
50
- const ptr1 = passStringToWasm0(depends_on, wasm.__wbindgen_export, wasm.__wbindgen_export2);
51
- const len1 = WASM_VECTOR_LEN;
52
- wasm.xcodeproject_addDependency(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
53
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
54
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
55
- let v3;
56
- if (r0 !== 0) {
57
- v3 = getStringFromWasm0(r0, r1).slice();
58
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
59
- }
60
- return v3;
61
- } finally {
62
- wasm.__wbindgen_add_to_stack_pointer(16);
63
- }
64
- }
65
- /**
66
- * @param {string} group_uuid
67
- * @param {string} path
68
- * @returns {string | undefined}
69
- */
70
- addFile(group_uuid, path) {
71
- try {
72
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
73
- const ptr0 = passStringToWasm0(group_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
74
- const len0 = WASM_VECTOR_LEN;
75
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
76
- const len1 = WASM_VECTOR_LEN;
77
- wasm.xcodeproject_addFile(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
78
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
79
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
80
- let v3;
81
- if (r0 !== 0) {
82
- v3 = getStringFromWasm0(r0, r1).slice();
83
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
84
- }
85
- return v3;
86
- } finally {
87
- wasm.__wbindgen_add_to_stack_pointer(16);
88
- }
89
- }
90
- /**
91
- * @param {string} target_uuid
92
- * @param {string} path
93
- * @returns {string | undefined}
94
- */
95
- addFileSystemSyncGroup(target_uuid, path) {
96
- try {
97
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
98
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
99
- const len0 = WASM_VECTOR_LEN;
100
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
101
- const len1 = WASM_VECTOR_LEN;
102
- wasm.xcodeproject_addFileSystemSyncGroup(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
103
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
104
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
105
- let v3;
106
- if (r0 !== 0) {
107
- v3 = getStringFromWasm0(r0, r1).slice();
108
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
109
- }
110
- return v3;
111
- } finally {
112
- wasm.__wbindgen_add_to_stack_pointer(16);
113
- }
114
- }
115
- /**
116
- * @param {string} target_uuid
117
- * @param {string} framework_name
118
- * @returns {string | undefined}
119
- */
120
- addFramework(target_uuid, framework_name) {
121
- try {
122
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
123
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
124
- const len0 = WASM_VECTOR_LEN;
125
- const ptr1 = passStringToWasm0(framework_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
126
- const len1 = WASM_VECTOR_LEN;
127
- wasm.xcodeproject_addFramework(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
128
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
129
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
130
- let v3;
131
- if (r0 !== 0) {
132
- v3 = getStringFromWasm0(r0, r1).slice();
133
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
134
- }
135
- return v3;
136
- } finally {
137
- wasm.__wbindgen_add_to_stack_pointer(16);
138
- }
139
- }
140
- /**
141
- * @param {string} parent_uuid
142
- * @param {string} name
143
- * @returns {string | undefined}
144
- */
145
- addGroup(parent_uuid, name) {
146
- try {
147
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
148
- const ptr0 = passStringToWasm0(parent_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
149
- const len0 = WASM_VECTOR_LEN;
150
- const ptr1 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
151
- const len1 = WASM_VECTOR_LEN;
152
- wasm.xcodeproject_addGroup(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
153
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
154
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
155
- let v3;
156
- if (r0 !== 0) {
157
- v3 = getStringFromWasm0(r0, r1).slice();
158
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
159
- }
160
- return v3;
161
- } finally {
162
- wasm.__wbindgen_add_to_stack_pointer(16);
163
- }
164
- }
165
- /**
166
- * @returns {bigint}
167
- */
168
- get archiveVersion() {
169
- const ret = wasm.xcodeproject_archiveVersion(this.__wbg_ptr);
170
- return ret;
171
- }
172
- /**
173
- * @param {string} name
174
- * @param {string} product_type
175
- * @param {string} bundle_id
176
- * @returns {string | undefined}
177
- */
178
- createNativeTarget(name, product_type, bundle_id) {
179
- try {
180
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
181
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
182
- const len0 = WASM_VECTOR_LEN;
183
- const ptr1 = passStringToWasm0(product_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
184
- const len1 = WASM_VECTOR_LEN;
185
- const ptr2 = passStringToWasm0(bundle_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
186
- const len2 = WASM_VECTOR_LEN;
187
- wasm.xcodeproject_createNativeTarget(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
188
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
189
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
190
- let v4;
191
- if (r0 !== 0) {
192
- v4 = getStringFromWasm0(r0, r1).slice();
193
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
194
- }
195
- return v4;
196
- } finally {
197
- wasm.__wbindgen_add_to_stack_pointer(16);
198
- }
199
- }
200
- /**
201
- * @param {string} host
202
- * @param {string} extension
203
- * @returns {string | undefined}
204
- */
205
- embedExtension(host, extension) {
206
- try {
207
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
208
- const ptr0 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
209
- const len0 = WASM_VECTOR_LEN;
210
- const ptr1 = passStringToWasm0(extension, wasm.__wbindgen_export, wasm.__wbindgen_export2);
211
- const len1 = WASM_VECTOR_LEN;
212
- wasm.xcodeproject_embedExtension(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
213
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
214
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
215
- let v3;
216
- if (r0 !== 0) {
217
- v3 = getStringFromWasm0(r0, r1).slice();
218
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
219
- }
220
- return v3;
221
- } finally {
222
- wasm.__wbindgen_add_to_stack_pointer(16);
223
- }
224
- }
225
- /**
226
- * @param {string} target_uuid
227
- * @param {string} phase_isa
228
- * @returns {string | undefined}
229
- */
230
- ensureBuildPhase(target_uuid, phase_isa) {
231
- try {
232
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
233
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
234
- const len0 = WASM_VECTOR_LEN;
235
- const ptr1 = passStringToWasm0(phase_isa, wasm.__wbindgen_export, wasm.__wbindgen_export2);
236
- const len1 = WASM_VECTOR_LEN;
237
- wasm.xcodeproject_ensureBuildPhase(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
238
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
239
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
240
- let v3;
241
- if (r0 !== 0) {
242
- v3 = getStringFromWasm0(r0, r1).slice();
243
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
244
- }
245
- return v3;
246
- } finally {
247
- wasm.__wbindgen_add_to_stack_pointer(16);
248
- }
249
- }
250
- /**
251
- * @param {string | null} [platform]
252
- * @returns {string | undefined}
253
- */
254
- findMainAppTarget(platform) {
255
- try {
256
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
257
- var ptr0 = isLikeNone(platform) ? 0 : passStringToWasm0(platform, wasm.__wbindgen_export, wasm.__wbindgen_export2);
258
- var len0 = WASM_VECTOR_LEN;
259
- wasm.xcodeproject_findMainAppTarget(retptr, this.__wbg_ptr, ptr0, len0);
260
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
261
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
262
- let v2;
263
- if (r0 !== 0) {
264
- v2 = getStringFromWasm0(r0, r1).slice();
265
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
266
- }
267
- return v2;
268
- } finally {
269
- wasm.__wbindgen_add_to_stack_pointer(16);
270
- }
271
- }
272
- /**
273
- * @param {string} isa
274
- * @returns {string[]}
275
- */
276
- findObjectsByIsa(isa) {
277
- try {
278
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
279
- const ptr0 = passStringToWasm0(isa, wasm.__wbindgen_export, wasm.__wbindgen_export2);
280
- const len0 = WASM_VECTOR_LEN;
281
- wasm.xcodeproject_findObjectsByIsa(retptr, this.__wbg_ptr, ptr0, len0);
282
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
283
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
284
- var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
285
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
286
- return v2;
287
- } finally {
288
- wasm.__wbindgen_add_to_stack_pointer(16);
289
- }
290
- }
291
- /**
292
- * @returns {string}
293
- */
294
- findOrphanedReferences() {
295
- let deferred1_0;
296
- let deferred1_1;
297
- try {
298
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
299
- wasm.xcodeproject_findOrphanedReferences(retptr, this.__wbg_ptr);
300
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
301
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
302
- deferred1_0 = r0;
303
- deferred1_1 = r1;
304
- return getStringFromWasm0(r0, r1);
305
- } finally {
306
- wasm.__wbindgen_add_to_stack_pointer(16);
307
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
308
- }
309
- }
310
- /**
311
- * @param {string} target_uuid
312
- * @param {string} key
313
- * @returns {string | undefined}
314
- */
315
- getBuildSetting(target_uuid, key) {
316
- try {
317
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
318
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
319
- const len0 = WASM_VECTOR_LEN;
320
- const ptr1 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
321
- const len1 = WASM_VECTOR_LEN;
322
- wasm.xcodeproject_getBuildSetting(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
323
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
324
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
325
- let v3;
326
- if (r0 !== 0) {
327
- v3 = getStringFromWasm0(r0, r1).slice();
328
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
329
- }
330
- return v3;
331
- } finally {
332
- wasm.__wbindgen_add_to_stack_pointer(16);
333
- }
334
- }
335
- /**
336
- * @param {string} group_uuid
337
- * @returns {string[]}
338
- */
339
- getGroupChildren(group_uuid) {
340
- try {
341
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
342
- const ptr0 = passStringToWasm0(group_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
343
- const len0 = WASM_VECTOR_LEN;
344
- wasm.xcodeproject_getGroupChildren(retptr, this.__wbg_ptr, ptr0, len0);
345
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
346
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
347
- var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
348
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
349
- return v2;
350
- } finally {
351
- wasm.__wbindgen_add_to_stack_pointer(16);
352
- }
353
- }
354
- /**
355
- * @returns {string[]}
356
- */
357
- getNativeTargets() {
358
- try {
359
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
360
- wasm.xcodeproject_getNativeTargets(retptr, this.__wbg_ptr);
361
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
362
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
363
- var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
364
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
365
- return v1;
366
- } finally {
367
- wasm.__wbindgen_add_to_stack_pointer(16);
368
- }
369
- }
370
- /**
371
- * @param {string} uuid
372
- * @param {string} key
373
- * @returns {string | undefined}
374
- */
375
- getObjectProperty(uuid, key) {
376
- try {
377
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
378
- const ptr0 = passStringToWasm0(uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
379
- const len0 = WASM_VECTOR_LEN;
380
- const ptr1 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
381
- const len1 = WASM_VECTOR_LEN;
382
- wasm.xcodeproject_getObjectProperty(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
383
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
384
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
385
- let v3;
386
- if (r0 !== 0) {
387
- v3 = getStringFromWasm0(r0, r1).slice();
388
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
389
- }
390
- return v3;
391
- } finally {
392
- wasm.__wbindgen_add_to_stack_pointer(16);
393
- }
394
- }
395
- /**
396
- * @param {string} target_uuid
397
- * @returns {string | undefined}
398
- */
399
- getTargetName(target_uuid) {
400
- try {
401
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
402
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
403
- const len0 = WASM_VECTOR_LEN;
404
- wasm.xcodeproject_getTargetName(retptr, this.__wbg_ptr, ptr0, len0);
405
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
406
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
407
- let v2;
408
- if (r0 !== 0) {
409
- v2 = getStringFromWasm0(r0, r1).slice();
410
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
411
- }
412
- return v2;
413
- } finally {
414
- wasm.__wbindgen_add_to_stack_pointer(16);
415
- }
416
- }
417
- /**
418
- * @param {string} seed
419
- * @returns {string}
420
- */
421
- getUniqueId(seed) {
422
- let deferred2_0;
423
- let deferred2_1;
424
- try {
425
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
426
- const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_export, wasm.__wbindgen_export2);
427
- const len0 = WASM_VECTOR_LEN;
428
- wasm.xcodeproject_getUniqueId(retptr, this.__wbg_ptr, ptr0, len0);
429
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
430
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
431
- deferred2_0 = r0;
432
- deferred2_1 = r1;
433
- return getStringFromWasm0(r0, r1);
434
- } finally {
435
- wasm.__wbindgen_add_to_stack_pointer(16);
436
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
437
- }
438
- }
439
- /**
440
- * @returns {string | undefined}
441
- */
442
- get mainGroupUuid() {
443
- try {
444
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
445
- wasm.xcodeproject_mainGroupUuid(retptr, this.__wbg_ptr);
446
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
447
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
448
- let v1;
449
- if (r0 !== 0) {
450
- v1 = getStringFromWasm0(r0, r1).slice();
451
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
452
- }
453
- return v1;
454
- } finally {
455
- wasm.__wbindgen_add_to_stack_pointer(16);
456
- }
457
- }
458
- /**
459
- * Parse a .pbxproj string into an XcodeProject.
460
- * @param {string} content
461
- */
462
- constructor(content) {
463
- try {
464
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
465
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
466
- const len0 = WASM_VECTOR_LEN;
467
- wasm.xcodeproject_new(retptr, ptr0, len0);
468
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
469
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
470
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
471
- if (r2) {
472
- throw takeObject(r1);
473
- }
474
- this.__wbg_ptr = r0 >>> 0;
475
- XcodeProjectFinalization.register(this, this.__wbg_ptr, this);
476
- return this;
477
- } finally {
478
- wasm.__wbindgen_add_to_stack_pointer(16);
479
- }
480
- }
481
- /**
482
- * @returns {bigint}
483
- */
484
- get objectVersion() {
485
- const ret = wasm.xcodeproject_objectVersion(this.__wbg_ptr);
486
- return ret;
487
- }
488
- /**
489
- * @param {string} target_uuid
490
- * @param {string} key
491
- * @returns {boolean}
492
- */
493
- removeBuildSetting(target_uuid, key) {
494
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
495
- const len0 = WASM_VECTOR_LEN;
496
- const ptr1 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
497
- const len1 = WASM_VECTOR_LEN;
498
- const ret = wasm.xcodeproject_removeBuildSetting(this.__wbg_ptr, ptr0, len0, ptr1, len1);
499
- return ret !== 0;
500
- }
501
- /**
502
- * Rename a target and cascade through the project (group paths, product refs, proxies).
503
- * @param {string} target_uuid
504
- * @param {string} old_name
505
- * @param {string} new_name
506
- * @returns {boolean}
507
- */
508
- renameTarget(target_uuid, old_name, new_name) {
509
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
510
- const len0 = WASM_VECTOR_LEN;
511
- const ptr1 = passStringToWasm0(old_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
512
- const len1 = WASM_VECTOR_LEN;
513
- const ptr2 = passStringToWasm0(new_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
514
- const len2 = WASM_VECTOR_LEN;
515
- const ret = wasm.xcodeproject_renameTarget(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
516
- return ret !== 0;
517
- }
518
- /**
519
- * @param {string} target_uuid
520
- * @param {string} key
521
- * @param {string} value
522
- * @returns {boolean}
523
- */
524
- setBuildSetting(target_uuid, key, value) {
525
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
526
- const len0 = WASM_VECTOR_LEN;
527
- const ptr1 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
528
- const len1 = WASM_VECTOR_LEN;
529
- const ptr2 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
530
- const len2 = WASM_VECTOR_LEN;
531
- const ret = wasm.xcodeproject_setBuildSetting(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
532
- return ret !== 0;
533
- }
534
- /**
535
- * @param {string} uuid
536
- * @param {string} key
537
- * @param {string} value
538
- * @returns {boolean}
539
- */
540
- setObjectProperty(uuid, key, value) {
541
- const ptr0 = passStringToWasm0(uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
542
- const len0 = WASM_VECTOR_LEN;
543
- const ptr1 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
544
- const len1 = WASM_VECTOR_LEN;
545
- const ptr2 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
546
- const len2 = WASM_VECTOR_LEN;
547
- const ret = wasm.xcodeproject_setObjectProperty(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
548
- return ret !== 0;
549
- }
550
- /**
551
- * @param {string} target_uuid
552
- * @param {string} name
553
- * @returns {boolean}
554
- */
555
- setTargetName(target_uuid, name) {
556
- const ptr0 = passStringToWasm0(target_uuid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
557
- const len0 = WASM_VECTOR_LEN;
558
- const ptr1 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
559
- const len1 = WASM_VECTOR_LEN;
560
- const ret = wasm.xcodeproject_setTargetName(this.__wbg_ptr, ptr0, len0, ptr1, len1);
561
- return ret !== 0;
562
- }
563
- /**
564
- * Serialize the project back to .pbxproj format.
565
- * @returns {string}
566
- */
567
- toBuild() {
568
- let deferred1_0;
569
- let deferred1_1;
570
- try {
571
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
572
- wasm.xcodeproject_toBuild(retptr, this.__wbg_ptr);
573
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
574
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
575
- deferred1_0 = r0;
576
- deferred1_1 = r1;
577
- return getStringFromWasm0(r0, r1);
578
- } finally {
579
- wasm.__wbindgen_add_to_stack_pointer(16);
580
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
581
- }
582
- }
583
- /**
584
- * Convert the project to a JS object.
585
- * @returns {any}
586
- */
587
- toJSON() {
588
- try {
589
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
590
- wasm.xcodeproject_toJSON(retptr, this.__wbg_ptr);
591
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
592
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
593
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
594
- if (r2) {
595
- throw takeObject(r1);
596
- }
597
- return takeObject(r0);
598
- } finally {
599
- wasm.__wbindgen_add_to_stack_pointer(16);
600
- }
601
- }
602
- }
603
- if (Symbol.dispose) XcodeProject.prototype[Symbol.dispose] = XcodeProject.prototype.free;
604
-
605
- /**
606
- * Serialize a JS object back to .pbxproj format.
607
- * @param {any} project
608
- * @returns {string}
609
- */
610
- export function build(project) {
611
- let deferred2_0;
612
- let deferred2_1;
613
- try {
614
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
615
- wasm.build(retptr, addHeapObject(project));
616
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
617
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
618
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
619
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
620
- var ptr1 = r0;
621
- var len1 = r1;
622
- if (r3) {
623
- ptr1 = 0; len1 = 0;
624
- throw takeObject(r2);
625
- }
626
- deferred2_0 = ptr1;
627
- deferred2_1 = len1;
628
- return getStringFromWasm0(ptr1, len1);
629
- } finally {
630
- wasm.__wbindgen_add_to_stack_pointer(16);
631
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
632
- }
633
- }
634
-
635
- /**
636
- * Parse a .pbxproj string into a JS object.
637
- * @param {string} text
638
- * @returns {any}
639
- */
640
- export function parse(text) {
641
- try {
642
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
643
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
644
- const len0 = WASM_VECTOR_LEN;
645
- wasm.parse(retptr, ptr0, len0);
646
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
647
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
648
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
649
- if (r2) {
650
- throw takeObject(r1);
651
- }
652
- return takeObject(r0);
653
- } finally {
654
- wasm.__wbindgen_add_to_stack_pointer(16);
655
- }
656
- }
657
-
658
- /**
659
- * Parse and immediately re-serialize a .pbxproj string.
660
- * @param {string} text
661
- * @returns {string}
662
- */
663
- export function parseAndBuild(text) {
664
- let deferred3_0;
665
- let deferred3_1;
666
- try {
667
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
668
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
669
- const len0 = WASM_VECTOR_LEN;
670
- wasm.parseAndBuild(retptr, ptr0, len0);
671
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
672
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
673
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
674
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
675
- var ptr2 = r0;
676
- var len2 = r1;
677
- if (r3) {
678
- ptr2 = 0; len2 = 0;
679
- throw takeObject(r2);
680
- }
681
- deferred3_0 = ptr2;
682
- deferred3_1 = len2;
683
- return getStringFromWasm0(ptr2, len2);
684
- } finally {
685
- wasm.__wbindgen_add_to_stack_pointer(16);
686
- wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
687
- }
688
- }
689
- export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
690
- const ret = Error(getStringFromWasm0(arg0, arg1));
691
- return addHeapObject(ret);
692
- }
693
- export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
694
- const ret = String(getObject(arg1));
695
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
696
- const len1 = WASM_VECTOR_LEN;
697
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
698
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
699
- }
700
- export function __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2(arg0, arg1) {
701
- const v = getObject(arg1);
702
- const ret = typeof(v) === 'bigint' ? v : undefined;
703
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
704
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
705
- }
706
- export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
707
- const v = getObject(arg0);
708
- const ret = typeof(v) === 'boolean' ? v : undefined;
709
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
710
- }
711
- export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
712
- const ret = debugString(getObject(arg1));
713
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
714
- const len1 = WASM_VECTOR_LEN;
715
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
716
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
717
- }
718
- export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
719
- const ret = getObject(arg0) in getObject(arg1);
720
- return ret;
721
- }
722
- export function __wbg___wbindgen_is_bigint_31b12575b56f32fc(arg0) {
723
- const ret = typeof(getObject(arg0)) === 'bigint';
724
- return ret;
725
- }
726
- export function __wbg___wbindgen_is_function_0095a73b8b156f76(arg0) {
727
- const ret = typeof(getObject(arg0)) === 'function';
728
- return ret;
729
- }
730
- export function __wbg___wbindgen_is_object_5ae8e5880f2c1fbd(arg0) {
731
- const val = getObject(arg0);
732
- const ret = typeof(val) === 'object' && val !== null;
733
- return ret;
734
- }
735
- export function __wbg___wbindgen_is_string_cd444516edc5b180(arg0) {
736
- const ret = typeof(getObject(arg0)) === 'string';
737
- return ret;
738
- }
739
- export function __wbg___wbindgen_jsval_eq_11888390b0186270(arg0, arg1) {
740
- const ret = getObject(arg0) === getObject(arg1);
741
- return ret;
742
- }
743
- export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
744
- const ret = getObject(arg0) == getObject(arg1);
745
- return ret;
746
- }
747
- export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
748
- const obj = getObject(arg1);
749
- const ret = typeof(obj) === 'number' ? obj : undefined;
750
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
751
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
752
- }
753
- export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
754
- const obj = getObject(arg1);
755
- const ret = typeof(obj) === 'string' ? obj : undefined;
756
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
757
- var len1 = WASM_VECTOR_LEN;
758
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
759
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
760
- }
761
- export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
762
- throw new Error(getStringFromWasm0(arg0, arg1));
763
- }
764
- export function __wbg_call_389efe28435a9388() { return handleError(function (arg0, arg1) {
765
- const ret = getObject(arg0).call(getObject(arg1));
766
- return addHeapObject(ret);
767
- }, arguments); }
768
- export function __wbg_done_57b39ecd9addfe81(arg0) {
769
- const ret = getObject(arg0).done;
770
- return ret;
771
- }
772
- export function __wbg_entries_58c7934c745daac7(arg0) {
773
- const ret = Object.entries(getObject(arg0));
774
- return addHeapObject(ret);
775
- }
776
- export function __wbg_get_9b94d73e6221f75c(arg0, arg1) {
777
- const ret = getObject(arg0)[arg1 >>> 0];
778
- return addHeapObject(ret);
779
- }
780
- export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
781
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
782
- return addHeapObject(ret);
783
- }, arguments); }
784
- export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
785
- let result;
786
- try {
787
- result = getObject(arg0) instanceof ArrayBuffer;
788
- } catch (_) {
789
- result = false;
790
- }
791
- const ret = result;
792
- return ret;
793
- }
794
- export function __wbg_instanceof_Map_53af74335dec57f4(arg0) {
795
- let result;
796
- try {
797
- result = getObject(arg0) instanceof Map;
798
- } catch (_) {
799
- result = false;
800
- }
801
- const ret = result;
802
- return ret;
803
- }
804
- export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
805
- let result;
806
- try {
807
- result = getObject(arg0) instanceof Uint8Array;
808
- } catch (_) {
809
- result = false;
810
- }
811
- const ret = result;
812
- return ret;
813
- }
814
- export function __wbg_isArray_d314bb98fcf08331(arg0) {
815
- const ret = Array.isArray(getObject(arg0));
816
- return ret;
817
- }
818
- export function __wbg_isSafeInteger_bfbc7332a9768d2a(arg0) {
819
- const ret = Number.isSafeInteger(getObject(arg0));
820
- return ret;
821
- }
822
- export function __wbg_iterator_6ff6560ca1568e55() {
823
- const ret = Symbol.iterator;
824
- return addHeapObject(ret);
825
- }
826
- export function __wbg_length_32ed9a279acd054c(arg0) {
827
- const ret = getObject(arg0).length;
828
- return ret;
829
- }
830
- export function __wbg_length_35a7bace40f36eac(arg0) {
831
- const ret = getObject(arg0).length;
832
- return ret;
833
- }
834
- export function __wbg_new_361308b2356cecd0() {
835
- const ret = new Object();
836
- return addHeapObject(ret);
837
- }
838
- export function __wbg_new_3eb36ae241fe6f44() {
839
- const ret = new Array();
840
- return addHeapObject(ret);
841
- }
842
- export function __wbg_new_dca287b076112a51() {
843
- const ret = new Map();
844
- return addHeapObject(ret);
845
- }
846
- export function __wbg_new_dd2b680c8bf6ae29(arg0) {
847
- const ret = new Uint8Array(getObject(arg0));
848
- return addHeapObject(ret);
849
- }
850
- export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
851
- const ret = getObject(arg0).next();
852
- return addHeapObject(ret);
853
- }, arguments); }
854
- export function __wbg_next_418f80d8f5303233(arg0) {
855
- const ret = getObject(arg0).next;
856
- return addHeapObject(ret);
857
- }
858
- export function __wbg_prototypesetcall_bdcdcc5842e4d77d(arg0, arg1, arg2) {
859
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
860
- }
861
- export function __wbg_set_1eb0999cf5d27fc8(arg0, arg1, arg2) {
862
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
863
- return addHeapObject(ret);
864
- }
865
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
866
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
867
- }
868
- export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) {
869
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
870
- }
871
- export function __wbg_value_0546255b415e96c1(arg0) {
872
- const ret = getObject(arg0).value;
873
- return addHeapObject(ret);
874
- }
875
- export function __wbindgen_cast_0000000000000001(arg0) {
876
- // Cast intrinsic for `F64 -> Externref`.
877
- const ret = arg0;
878
- return addHeapObject(ret);
879
- }
880
- export function __wbindgen_cast_0000000000000002(arg0) {
881
- // Cast intrinsic for `I64 -> Externref`.
882
- const ret = arg0;
883
- return addHeapObject(ret);
884
- }
885
- export function __wbindgen_cast_0000000000000003(arg0, arg1) {
886
- // Cast intrinsic for `Ref(String) -> Externref`.
887
- const ret = getStringFromWasm0(arg0, arg1);
888
- return addHeapObject(ret);
889
- }
890
- export function __wbindgen_cast_0000000000000004(arg0) {
891
- // Cast intrinsic for `U64 -> Externref`.
892
- const ret = BigInt.asUintN(64, arg0);
893
- return addHeapObject(ret);
894
- }
895
- export function __wbindgen_object_drop_ref(arg0) {
896
- takeObject(arg0);
897
- }
898
- const XcodeProjectFinalization = (typeof FinalizationRegistry === 'undefined')
899
- ? { register: () => {}, unregister: () => {} }
900
- : new FinalizationRegistry(ptr => wasm.__wbg_xcodeproject_free(ptr >>> 0, 1));
901
-
902
- function addHeapObject(obj) {
903
- if (heap_next === heap.length) heap.push(heap.length + 1);
904
- const idx = heap_next;
905
- heap_next = heap[idx];
906
-
907
- heap[idx] = obj;
908
- return idx;
909
- }
910
-
911
- function debugString(val) {
912
- // primitive types
913
- const type = typeof val;
914
- if (type == 'number' || type == 'boolean' || val == null) {
915
- return `${val}`;
916
- }
917
- if (type == 'string') {
918
- return `"${val}"`;
919
- }
920
- if (type == 'symbol') {
921
- const description = val.description;
922
- if (description == null) {
923
- return 'Symbol';
924
- } else {
925
- return `Symbol(${description})`;
926
- }
927
- }
928
- if (type == 'function') {
929
- const name = val.name;
930
- if (typeof name == 'string' && name.length > 0) {
931
- return `Function(${name})`;
932
- } else {
933
- return 'Function';
934
- }
935
- }
936
- // objects
937
- if (Array.isArray(val)) {
938
- const length = val.length;
939
- let debug = '[';
940
- if (length > 0) {
941
- debug += debugString(val[0]);
942
- }
943
- for(let i = 1; i < length; i++) {
944
- debug += ', ' + debugString(val[i]);
945
- }
946
- debug += ']';
947
- return debug;
948
- }
949
- // Test for built-in
950
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
951
- let className;
952
- if (builtInMatches && builtInMatches.length > 1) {
953
- className = builtInMatches[1];
954
- } else {
955
- // Failed to match the standard '[object ClassName]'
956
- return toString.call(val);
957
- }
958
- if (className == 'Object') {
959
- // we're a user defined class or Object
960
- // JSON.stringify avoids problems with cycles, and is generally much
961
- // easier than looping through ownProperties of `val`.
962
- try {
963
- return 'Object(' + JSON.stringify(val) + ')';
964
- } catch (_) {
965
- return 'Object';
966
- }
967
- }
968
- // errors
969
- if (val instanceof Error) {
970
- return `${val.name}: ${val.message}\n${val.stack}`;
971
- }
972
- // TODO we could test for more things here, like `Set`s and `Map`s.
973
- return className;
974
- }
975
-
976
- function dropObject(idx) {
977
- if (idx < 132) return;
978
- heap[idx] = heap_next;
979
- heap_next = idx;
980
- }
981
-
982
- function getArrayJsValueFromWasm0(ptr, len) {
983
- ptr = ptr >>> 0;
984
- const mem = getDataViewMemory0();
985
- const result = [];
986
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
987
- result.push(takeObject(mem.getUint32(i, true)));
988
- }
989
- return result;
990
- }
991
-
992
- function getArrayU8FromWasm0(ptr, len) {
993
- ptr = ptr >>> 0;
994
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
995
- }
996
-
997
- let cachedDataViewMemory0 = null;
998
- function getDataViewMemory0() {
999
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1000
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1001
- }
1002
- return cachedDataViewMemory0;
1003
- }
1004
-
1005
- function getStringFromWasm0(ptr, len) {
1006
- ptr = ptr >>> 0;
1007
- return decodeText(ptr, len);
1008
- }
1009
-
1010
- let cachedUint8ArrayMemory0 = null;
1011
- function getUint8ArrayMemory0() {
1012
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1013
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1014
- }
1015
- return cachedUint8ArrayMemory0;
1016
- }
1017
-
1018
- function getObject(idx) { return heap[idx]; }
1019
-
1020
- function handleError(f, args) {
1021
- try {
1022
- return f.apply(this, args);
1023
- } catch (e) {
1024
- wasm.__wbindgen_export3(addHeapObject(e));
1025
- }
1026
- }
1027
-
1028
- let heap = new Array(128).fill(undefined);
1029
- heap.push(undefined, null, true, false);
1030
-
1031
- let heap_next = heap.length;
1032
-
1033
- function isLikeNone(x) {
1034
- return x === undefined || x === null;
1035
- }
1036
-
1037
- function passStringToWasm0(arg, malloc, realloc) {
1038
- if (realloc === undefined) {
1039
- const buf = cachedTextEncoder.encode(arg);
1040
- const ptr = malloc(buf.length, 1) >>> 0;
1041
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1042
- WASM_VECTOR_LEN = buf.length;
1043
- return ptr;
1044
- }
1045
-
1046
- let len = arg.length;
1047
- let ptr = malloc(len, 1) >>> 0;
1048
-
1049
- const mem = getUint8ArrayMemory0();
1050
-
1051
- let offset = 0;
1052
-
1053
- for (; offset < len; offset++) {
1054
- const code = arg.charCodeAt(offset);
1055
- if (code > 0x7F) break;
1056
- mem[ptr + offset] = code;
1057
- }
1058
- if (offset !== len) {
1059
- if (offset !== 0) {
1060
- arg = arg.slice(offset);
1061
- }
1062
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1063
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1064
- const ret = cachedTextEncoder.encodeInto(arg, view);
1065
-
1066
- offset += ret.written;
1067
- ptr = realloc(ptr, len, offset, 1) >>> 0;
1068
- }
1069
-
1070
- WASM_VECTOR_LEN = offset;
1071
- return ptr;
1072
- }
1073
-
1074
- function takeObject(idx) {
1075
- const ret = getObject(idx);
1076
- dropObject(idx);
1077
- return ret;
1078
- }
1079
-
1080
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1081
- cachedTextDecoder.decode();
1082
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
1083
- let numBytesDecoded = 0;
1084
- function decodeText(ptr, len) {
1085
- numBytesDecoded += len;
1086
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1087
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1088
- cachedTextDecoder.decode();
1089
- numBytesDecoded = len;
1090
- }
1091
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1092
- }
1093
-
1094
- const cachedTextEncoder = new TextEncoder();
1095
-
1096
- if (!('encodeInto' in cachedTextEncoder)) {
1097
- cachedTextEncoder.encodeInto = function (arg, view) {
1098
- const buf = cachedTextEncoder.encode(arg);
1099
- view.set(buf);
1100
- return {
1101
- read: arg.length,
1102
- written: buf.length
1103
- };
1104
- };
1105
- }
1106
-
1107
- let WASM_VECTOR_LEN = 0;
1108
-
1109
-
1110
- let wasm;
1111
- export function __wbg_set_wasm(val) {
1112
- wasm = val;
1113
- }