privateer-agent 0.15.4 → 0.15.6
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/README.md +11 -0
- package/bin/boot-bundle.d.mts +2 -0
- package/bin/boot-bundle.mjs +44 -0
- package/bin/fresh-supervisor.d.mts +5 -1
- package/bin/fresh-supervisor.mjs +47 -10
- package/bin/privateer-launch.mjs +27 -3
- package/bin/privateer-subagent.mjs +5 -2
- package/bin/privateer-verify.mjs +12 -0
- package/bin/session-recovery.d.mts +53 -0
- package/bin/session-recovery.mjs +240 -0
- package/bin/session-seal-preload.mjs +17 -0
- package/bin/session-seal.d.mts +25 -0
- package/bin/session-seal.mjs +242 -0
- package/dist-boot/boot.mjs +3 -0
- package/dist-boot/c-27JKSMWL.mjs +1460 -0
- package/dist-boot/c-2BMRFV24.mjs +269 -0
- package/dist-boot/c-2CTF6JA3.mjs +166 -0
- package/dist-boot/c-2G3BBHRJ.mjs +84 -0
- package/dist-boot/c-2IDLKXX6.mjs +250 -0
- package/dist-boot/c-2NJD5VYM.mjs +8 -0
- package/dist-boot/c-2S5EEQPW.mjs +1602 -0
- package/dist-boot/c-2WRDCUVI.mjs +25 -0
- package/dist-boot/c-2YN3M256.mjs +14 -0
- package/dist-boot/c-37GM3GMU.mjs +187 -0
- package/dist-boot/c-3STKRSVO.mjs +2480 -0
- package/dist-boot/c-3TPV6TQQ.mjs +2320 -0
- package/dist-boot/c-3UVHLQDJ.mjs +225 -0
- package/dist-boot/c-42PUUZYC.mjs +697 -0
- package/dist-boot/c-4D5UMWVW.mjs +683 -0
- package/dist-boot/c-4ETZRMTA.mjs +46 -0
- package/dist-boot/c-4QT25BD5.mjs +1482 -0
- package/dist-boot/c-4WVR32AP.mjs +2579 -0
- package/dist-boot/c-5EMM567G.mjs +152 -0
- package/dist-boot/c-5FA4CV63.mjs +145 -0
- package/dist-boot/c-5GV3X3RB.mjs +14 -0
- package/dist-boot/c-5JCEPRIY.mjs +52 -0
- package/dist-boot/c-5NDKIIWT.mjs +16 -0
- package/dist-boot/c-5QL3AR26.mjs +4665 -0
- package/dist-boot/c-5XY6MFKN.mjs +5142 -0
- package/dist-boot/c-65UZIZC7.mjs +2897 -0
- package/dist-boot/c-6FUXKHOK.mjs +1969 -0
- package/dist-boot/c-6JHWQE4V.mjs +18242 -0
- package/dist-boot/c-6LOBR4I6.mjs +5280 -0
- package/dist-boot/c-6QHOZXKQ.mjs +14394 -0
- package/dist-boot/c-6ZO2SADQ.mjs +178 -0
- package/dist-boot/c-6ZORVVZP.mjs +1449 -0
- package/dist-boot/c-76QH4UCP.mjs +2441 -0
- package/dist-boot/c-77GO5L5Y.mjs +20982 -0
- package/dist-boot/c-7M23XFTN.mjs +5052 -0
- package/dist-boot/c-7TC367E2.mjs +32 -0
- package/dist-boot/c-7UOG7POX.mjs +1524 -0
- package/dist-boot/c-7VHP3FLN.mjs +376 -0
- package/dist-boot/c-A73JHZP2.mjs +13207 -0
- package/dist-boot/c-ABXULAFL.mjs +71 -0
- package/dist-boot/c-ANDD2AQO.mjs +74 -0
- package/dist-boot/c-AOY77AZL.mjs +1430 -0
- package/dist-boot/c-AXEPZ22I.mjs +108 -0
- package/dist-boot/c-B2Y7VNHU.mjs +427 -0
- package/dist-boot/c-B7VJUH73.mjs +77 -0
- package/dist-boot/c-BFW6CDVL.mjs +24 -0
- package/dist-boot/c-BHNIF2AR.mjs +188 -0
- package/dist-boot/c-BKF2O6BL.mjs +23 -0
- package/dist-boot/c-BOZXFTZN.mjs +8 -0
- package/dist-boot/c-BRNYJWZL.mjs +28 -0
- package/dist-boot/c-C3N4Z2HO.mjs +93 -0
- package/dist-boot/c-C4IV7ZFG.mjs +717 -0
- package/dist-boot/c-C5NK6UYV.mjs +793 -0
- package/dist-boot/c-C67644MB.mjs +1659 -0
- package/dist-boot/c-C6S2YB53.mjs +620 -0
- package/dist-boot/c-CDBEJSBF.mjs +37 -0
- package/dist-boot/c-CG47HBKU.mjs +435 -0
- package/dist-boot/c-CKCTWCT5.mjs +51 -0
- package/dist-boot/c-CN77DCGF.mjs +60 -0
- package/dist-boot/c-CRBXNKFO.mjs +1795 -0
- package/dist-boot/c-CRIHASQ6.mjs +973 -0
- package/dist-boot/c-CU4NGAUO.mjs +3786 -0
- package/dist-boot/c-CWRFLGQU.mjs +1883 -0
- package/dist-boot/c-CYQB2USO.mjs +32 -0
- package/dist-boot/c-DEE67DJO.mjs +379 -0
- package/dist-boot/c-DIFDBYOP.mjs +1258 -0
- package/dist-boot/c-DOSGVXDZ.mjs +34879 -0
- package/dist-boot/c-DR7XQI32.mjs +381 -0
- package/dist-boot/c-DTGPSB46.mjs +14666 -0
- package/dist-boot/c-DTHDNA4P.mjs +320 -0
- package/dist-boot/c-E4Z3Y5B5.mjs +3864 -0
- package/dist-boot/c-E66Z2TI7.mjs +203 -0
- package/dist-boot/c-EBU6RLRV.mjs +1527 -0
- package/dist-boot/c-EBZZNGSF.mjs +432 -0
- package/dist-boot/c-EC3LJ2KF.mjs +1032 -0
- package/dist-boot/c-EQBKXWNX.mjs +15829 -0
- package/dist-boot/c-EUEPIW4S.mjs +574 -0
- package/dist-boot/c-EX4YVWAT.mjs +378 -0
- package/dist-boot/c-EYZGSAJU.mjs +98 -0
- package/dist-boot/c-F75VRKY4.mjs +172 -0
- package/dist-boot/c-FH4NXKHV.mjs +177 -0
- package/dist-boot/c-FHNUCTEM.mjs +140 -0
- package/dist-boot/c-FJ5T42DS.mjs +5349 -0
- package/dist-boot/c-FPCNRL7G.mjs +1728 -0
- package/dist-boot/c-G4DLN7Q4.mjs +8 -0
- package/dist-boot/c-G56GYQFZ.mjs +2507 -0
- package/dist-boot/c-GLIOERDQ.mjs +1200 -0
- package/dist-boot/c-GMJ5HUBM.mjs +14 -0
- package/dist-boot/c-H3HSGMAQ.mjs +461 -0
- package/dist-boot/c-HIKTO6P7.mjs +275 -0
- package/dist-boot/c-I2MCJ34O.mjs +464 -0
- package/dist-boot/c-I3C6LBW4.mjs +765 -0
- package/dist-boot/c-I54OKQHW.mjs +387 -0
- package/dist-boot/c-IFSP3R4D.mjs +80 -0
- package/dist-boot/c-IZK77VB7.mjs +171 -0
- package/dist-boot/c-J3Y25UGE.mjs +54 -0
- package/dist-boot/c-J5IESS7W.mjs +27750 -0
- package/dist-boot/c-JJWZBY7L.mjs +254 -0
- package/dist-boot/c-JKTFXTGF.mjs +463 -0
- package/dist-boot/c-JN57AXQ4.mjs +77 -0
- package/dist-boot/c-KFIO6LUW.mjs +1096 -0
- package/dist-boot/c-KIEMEFWW.mjs +478 -0
- package/dist-boot/c-KIVXWBYD.mjs +28 -0
- package/dist-boot/c-KP6CRIP4.mjs +580 -0
- package/dist-boot/c-L26VOJX4.mjs +11558 -0
- package/dist-boot/c-L5GHWG5G.mjs +5988 -0
- package/dist-boot/c-M7NSQAKK.mjs +353 -0
- package/dist-boot/c-MCEWOPBW.mjs +56 -0
- package/dist-boot/c-MGPIEG7I.mjs +20 -0
- package/dist-boot/c-NREXJV3M.mjs +393 -0
- package/dist-boot/c-O5PP6CTX.mjs +162 -0
- package/dist-boot/c-OBQDHSXM.mjs +1774 -0
- package/dist-boot/c-OLQHHDD4.mjs +21 -0
- package/dist-boot/c-OXW4JQQH.mjs +319 -0
- package/dist-boot/c-P3D7ZUWN.mjs +1288 -0
- package/dist-boot/c-P4PQZVV5.mjs +948 -0
- package/dist-boot/c-P63T3XL2.mjs +26373 -0
- package/dist-boot/c-P6N5DQGZ.mjs +194 -0
- package/dist-boot/c-P7MLKQFC.mjs +58 -0
- package/dist-boot/c-PB3PZJL5.mjs +1276 -0
- package/dist-boot/c-PTN4S6G2.mjs +1259 -0
- package/dist-boot/c-PYCE5J7U.mjs +1083 -0
- package/dist-boot/c-Q4HYCRLB.mjs +19410 -0
- package/dist-boot/c-QUXMETGG.mjs +68 -0
- package/dist-boot/c-RDMJZCOX.mjs +356 -0
- package/dist-boot/c-ROGJK76M.mjs +17 -0
- package/dist-boot/c-RQJJ26T4.mjs +708 -0
- package/dist-boot/c-RSKCUPJF.mjs +7559 -0
- package/dist-boot/c-RVJU4O6P.mjs +37 -0
- package/dist-boot/c-S2RVHR3M.mjs +165 -0
- package/dist-boot/c-SKMK3PEE.mjs +91120 -0
- package/dist-boot/c-TI7SM4EG.mjs +20 -0
- package/dist-boot/c-TILJ6GXD.mjs +1235 -0
- package/dist-boot/c-TT6BCUJD.mjs +114 -0
- package/dist-boot/c-U4ITOXAN.mjs +2107 -0
- package/dist-boot/c-UGERXVO2.mjs +7120 -0
- package/dist-boot/c-UPBH5AXY.mjs +1363 -0
- package/dist-boot/c-US2PUNZL.mjs +597 -0
- package/dist-boot/c-UU4WZPPE.mjs +20 -0
- package/dist-boot/c-UWVIYPQS.mjs +39 -0
- package/dist-boot/c-V4RHQBPQ.mjs +17683 -0
- package/dist-boot/c-V5MRVK47.mjs +351 -0
- package/dist-boot/c-V6CL266R.mjs +1755 -0
- package/dist-boot/c-VJTMFKYE.mjs +14975 -0
- package/dist-boot/c-VJTRUKIB.mjs +773 -0
- package/dist-boot/c-W4IFSHPW.mjs +43 -0
- package/dist-boot/c-WETGB2CF.mjs +113 -0
- package/dist-boot/c-WO3QSZUU.mjs +1337 -0
- package/dist-boot/c-WQLH73TY.mjs +242 -0
- package/dist-boot/c-XL735JW5.mjs +500 -0
- package/dist-boot/c-Y7HADL5B.mjs +1107 -0
- package/dist-boot/c-YGQHSVSK.mjs +41 -0
- package/dist-boot/c-YMP2AMEB.mjs +10350 -0
- package/dist-boot/c-YRDO2WEF.mjs +12012 -0
- package/dist-boot/c-YUSTRATJ.mjs +8 -0
- package/dist-boot/c-Z2262R22.mjs +2697 -0
- package/dist-boot/c-Z4ALQMJC.mjs +709 -0
- package/dist-boot/c-Z5ZUQVUY.mjs +62 -0
- package/dist-boot/c-ZDZUKXF7.mjs +874 -0
- package/dist-boot/c-ZJYLGIC3.mjs +32 -0
- package/dist-boot/c-ZNA5CDMI.mjs +77 -0
- package/dist-boot/c-ZSO6DI3M.mjs +204 -0
- package/dist-boot/c-ZWUVHKMK.mjs +100 -0
- package/dist-boot/c-ZY4MESEW.mjs +832 -0
- package/dist-boot/c-ZZ5REI4L.mjs +329 -0
- package/dist-boot/cli.mjs +51 -0
- package/dist-boot/ext-anthropic-attribution.mjs +207 -0
- package/dist-boot/ext-pi-background-tasks.mjs +7234 -0
- package/dist-boot/ext-pi-subagents.mjs +37 -0
- package/dist-boot/ext-privateer-account.mjs +4426 -0
- package/dist-boot/ext-privateer-brand.mjs +5274 -0
- package/dist-boot/ext-privateer-codemode.mjs +37 -0
- package/dist-boot/ext-privateer-computer.mjs +626 -0
- package/dist-boot/ext-privateer-connect.mjs +1862 -0
- package/dist-boot/ext-privateer-context.mjs +323 -0
- package/dist-boot/ext-privateer-desktop.mjs +92 -0
- package/dist-boot/ext-privateer-final-audit.mjs +48 -0
- package/dist-boot/ext-privateer-fresh.mjs +81 -0
- package/dist-boot/ext-privateer-gate.mjs +5959 -0
- package/dist-boot/ext-privateer-hints.mjs +236 -0
- package/dist-boot/ext-privateer-media.mjs +2626 -0
- package/dist-boot/ext-privateer-models.mjs +3397 -0
- package/dist-boot/ext-privateer-posture.mjs +3006 -0
- package/dist-boot/ext-privateer-privacy.mjs +4578 -0
- package/dist-boot/ext-privateer-recovery.mjs +287 -0
- package/dist-boot/ext-privateer-speak.mjs +4754 -0
- package/dist-boot/ext-privateer-terminals.mjs +725 -0
- package/dist-boot/ext-privateer-tools.mjs +528 -0
- package/dist-boot/ext-privateer-truncation.mjs +74 -0
- package/dist-boot/ext-privateer-update.mjs +210 -0
- package/dist-boot/ext-privateer-vision.mjs +148 -0
- package/dist-boot/ext-privateer-web.mjs +543 -0
- package/dist-boot/ext-rpiv-ask-user-question.mjs +710 -0
- package/dist-boot/manifest.json +9 -0
- package/extensions/privateer-brand.ts +3 -1
- package/extensions/privateer-context.ts +4 -2
- package/extensions/privateer-final-audit.ts +17 -0
- package/extensions/privateer-gate.ts +55 -9
- package/extensions/privateer-recovery.ts +175 -0
- package/extensions/privateer-web.ts +4 -4
- package/package.json +3 -1
- package/patches/@earendil-works+pi-coding-agent+1.3.0.patch +199 -2
- package/patches/pi-background-tasks+2.6.10.patch +91 -7
- package/src/cli/chat.ts +7 -1
- package/src/config/moatManifest.json +2 -0
- package/src/config/whatsNew.json +4 -4
- package/src/context.ts +33 -5
- package/src/engine/finalAudit.ts +38 -0
- package/src/engine/stallWatchdog.ts +8 -1
- package/src/providers/account.ts +34 -3
- package/src/remote/attentionPush.ts +40 -0
- package/src/remote/liveTaskSession.ts +7 -1
- package/src/remote/relayClient.ts +38 -4
- package/src/remote/remoteBridge.ts +17 -0
- package/src/remote/transcriptSnapshot.ts +104 -0
|
@@ -0,0 +1,1449 @@
|
|
|
1
|
+
import{createRequire as __pvCR}from"node:module";import{fileURLToPath as __pvF}from"node:url";import{dirname as __pvD}from"node:path";const require=__pvCR(import.meta.url);const __pvUrl=(r)=>new URL(r,import.meta.url).href;const __pvFile=(r)=>__pvF(new URL(r,import.meta.url));
|
|
2
|
+
import {
|
|
3
|
+
__commonJS,
|
|
4
|
+
__name,
|
|
5
|
+
__require
|
|
6
|
+
} from "./c-CN77DCGF.mjs";
|
|
7
|
+
|
|
8
|
+
// node_modules/@earendil-works/pi-coding-agent/node_modules/@silvia-odwyer/photon-node/photon_rs.js
|
|
9
|
+
var require_photon_rs = __commonJS({
|
|
10
|
+
"node_modules/@earendil-works/pi-coding-agent/node_modules/@silvia-odwyer/photon-node/photon_rs.js"(exports, module) {
|
|
11
|
+
var __filename = __pvFile("../node_modules/@earendil-works/pi-coding-agent/node_modules/@silvia-odwyer/photon-node/photon_rs.js");
|
|
12
|
+
var __dirname = __pvD(__filename);
|
|
13
|
+
var imports = {};
|
|
14
|
+
imports["__wbindgen_placeholder__"] = module.exports;
|
|
15
|
+
var wasm;
|
|
16
|
+
var { TextEncoder, TextDecoder } = __require("util");
|
|
17
|
+
function debugString(val) {
|
|
18
|
+
const type = typeof val;
|
|
19
|
+
if (type == "number" || type == "boolean" || val == null) {
|
|
20
|
+
return `${val}`;
|
|
21
|
+
}
|
|
22
|
+
if (type == "string") {
|
|
23
|
+
return `"${val}"`;
|
|
24
|
+
}
|
|
25
|
+
if (type == "symbol") {
|
|
26
|
+
const description = val.description;
|
|
27
|
+
if (description == null) {
|
|
28
|
+
return "Symbol";
|
|
29
|
+
} else {
|
|
30
|
+
return `Symbol(${description})`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (type == "function") {
|
|
34
|
+
const name = val.name;
|
|
35
|
+
if (typeof name == "string" && name.length > 0) {
|
|
36
|
+
return `Function(${name})`;
|
|
37
|
+
} else {
|
|
38
|
+
return "Function";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(val)) {
|
|
42
|
+
const length = val.length;
|
|
43
|
+
let debug = "[";
|
|
44
|
+
if (length > 0) {
|
|
45
|
+
debug += debugString(val[0]);
|
|
46
|
+
}
|
|
47
|
+
for (let i = 1; i < length; i++) {
|
|
48
|
+
debug += ", " + debugString(val[i]);
|
|
49
|
+
}
|
|
50
|
+
debug += "]";
|
|
51
|
+
return debug;
|
|
52
|
+
}
|
|
53
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
54
|
+
let className;
|
|
55
|
+
if (builtInMatches.length > 1) {
|
|
56
|
+
className = builtInMatches[1];
|
|
57
|
+
} else {
|
|
58
|
+
return toString.call(val);
|
|
59
|
+
}
|
|
60
|
+
if (className == "Object") {
|
|
61
|
+
try {
|
|
62
|
+
return "Object(" + JSON.stringify(val) + ")";
|
|
63
|
+
} catch (_) {
|
|
64
|
+
return "Object";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (val instanceof Error) {
|
|
68
|
+
return `${val.name}: ${val.message}
|
|
69
|
+
${val.stack}`;
|
|
70
|
+
}
|
|
71
|
+
return className;
|
|
72
|
+
}
|
|
73
|
+
__name(debugString, "debugString");
|
|
74
|
+
var WASM_VECTOR_LEN = 0;
|
|
75
|
+
var cachedUint8ArrayMemory0 = null;
|
|
76
|
+
function getUint8ArrayMemory0() {
|
|
77
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
78
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
79
|
+
}
|
|
80
|
+
return cachedUint8ArrayMemory0;
|
|
81
|
+
}
|
|
82
|
+
__name(getUint8ArrayMemory0, "getUint8ArrayMemory0");
|
|
83
|
+
var cachedTextEncoder = new TextEncoder("utf-8");
|
|
84
|
+
var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
|
|
85
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
86
|
+
} : function(arg, view) {
|
|
87
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
88
|
+
view.set(buf);
|
|
89
|
+
return {
|
|
90
|
+
read: arg.length,
|
|
91
|
+
written: buf.length
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
95
|
+
if (realloc === void 0) {
|
|
96
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
97
|
+
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
98
|
+
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
99
|
+
WASM_VECTOR_LEN = buf.length;
|
|
100
|
+
return ptr2;
|
|
101
|
+
}
|
|
102
|
+
let len = arg.length;
|
|
103
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
104
|
+
const mem = getUint8ArrayMemory0();
|
|
105
|
+
let offset = 0;
|
|
106
|
+
for (; offset < len; offset++) {
|
|
107
|
+
const code = arg.charCodeAt(offset);
|
|
108
|
+
if (code > 127) break;
|
|
109
|
+
mem[ptr + offset] = code;
|
|
110
|
+
}
|
|
111
|
+
if (offset !== len) {
|
|
112
|
+
if (offset !== 0) {
|
|
113
|
+
arg = arg.slice(offset);
|
|
114
|
+
}
|
|
115
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
116
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
117
|
+
const ret = encodeString(arg, view);
|
|
118
|
+
offset += ret.written;
|
|
119
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
120
|
+
}
|
|
121
|
+
WASM_VECTOR_LEN = offset;
|
|
122
|
+
return ptr;
|
|
123
|
+
}
|
|
124
|
+
__name(passStringToWasm0, "passStringToWasm0");
|
|
125
|
+
var cachedDataViewMemory0 = null;
|
|
126
|
+
function getDataViewMemory0() {
|
|
127
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
128
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
129
|
+
}
|
|
130
|
+
return cachedDataViewMemory0;
|
|
131
|
+
}
|
|
132
|
+
__name(getDataViewMemory0, "getDataViewMemory0");
|
|
133
|
+
var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
134
|
+
cachedTextDecoder.decode();
|
|
135
|
+
function getStringFromWasm0(ptr, len) {
|
|
136
|
+
ptr = ptr >>> 0;
|
|
137
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
138
|
+
}
|
|
139
|
+
__name(getStringFromWasm0, "getStringFromWasm0");
|
|
140
|
+
function _assertClass(instance, klass) {
|
|
141
|
+
if (!(instance instanceof klass)) {
|
|
142
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
143
|
+
}
|
|
144
|
+
return instance.ptr;
|
|
145
|
+
}
|
|
146
|
+
__name(_assertClass, "_assertClass");
|
|
147
|
+
module.exports.alter_channel = function(img, channel, amt) {
|
|
148
|
+
_assertClass(img, PhotonImage);
|
|
149
|
+
wasm.alter_channel(img.__wbg_ptr, channel, amt);
|
|
150
|
+
};
|
|
151
|
+
module.exports.alter_red_channel = function(photon_image, amt) {
|
|
152
|
+
_assertClass(photon_image, PhotonImage);
|
|
153
|
+
wasm.alter_red_channel(photon_image.__wbg_ptr, amt);
|
|
154
|
+
};
|
|
155
|
+
module.exports.alter_green_channel = function(img, amt) {
|
|
156
|
+
_assertClass(img, PhotonImage);
|
|
157
|
+
wasm.alter_green_channel(img.__wbg_ptr, amt);
|
|
158
|
+
};
|
|
159
|
+
module.exports.alter_blue_channel = function(img, amt) {
|
|
160
|
+
_assertClass(img, PhotonImage);
|
|
161
|
+
wasm.alter_blue_channel(img.__wbg_ptr, amt);
|
|
162
|
+
};
|
|
163
|
+
module.exports.alter_two_channels = function(img, channel1, amt1, channel2, amt2) {
|
|
164
|
+
_assertClass(img, PhotonImage);
|
|
165
|
+
wasm.alter_two_channels(img.__wbg_ptr, channel1, amt1, channel2, amt2);
|
|
166
|
+
};
|
|
167
|
+
module.exports.alter_channels = function(img, r_amt, g_amt, b_amt) {
|
|
168
|
+
_assertClass(img, PhotonImage);
|
|
169
|
+
wasm.alter_channels(img.__wbg_ptr, r_amt, g_amt, b_amt);
|
|
170
|
+
};
|
|
171
|
+
module.exports.remove_channel = function(img, channel, min_filter) {
|
|
172
|
+
_assertClass(img, PhotonImage);
|
|
173
|
+
wasm.remove_channel(img.__wbg_ptr, channel, min_filter);
|
|
174
|
+
};
|
|
175
|
+
module.exports.remove_red_channel = function(img, min_filter) {
|
|
176
|
+
_assertClass(img, PhotonImage);
|
|
177
|
+
wasm.remove_red_channel(img.__wbg_ptr, min_filter);
|
|
178
|
+
};
|
|
179
|
+
module.exports.remove_green_channel = function(img, min_filter) {
|
|
180
|
+
_assertClass(img, PhotonImage);
|
|
181
|
+
wasm.remove_green_channel(img.__wbg_ptr, min_filter);
|
|
182
|
+
};
|
|
183
|
+
module.exports.remove_blue_channel = function(img, min_filter) {
|
|
184
|
+
_assertClass(img, PhotonImage);
|
|
185
|
+
wasm.remove_blue_channel(img.__wbg_ptr, min_filter);
|
|
186
|
+
};
|
|
187
|
+
module.exports.swap_channels = function(img, channel1, channel2) {
|
|
188
|
+
_assertClass(img, PhotonImage);
|
|
189
|
+
wasm.swap_channels(img.__wbg_ptr, channel1, channel2);
|
|
190
|
+
};
|
|
191
|
+
module.exports.invert = function(photon_image) {
|
|
192
|
+
_assertClass(photon_image, PhotonImage);
|
|
193
|
+
wasm.invert(photon_image.__wbg_ptr);
|
|
194
|
+
};
|
|
195
|
+
module.exports.selective_hue_rotate = function(photon_image, ref_color, degrees) {
|
|
196
|
+
_assertClass(photon_image, PhotonImage);
|
|
197
|
+
_assertClass(ref_color, Rgb);
|
|
198
|
+
var ptr0 = ref_color.__destroy_into_raw();
|
|
199
|
+
wasm.selective_hue_rotate(photon_image.__wbg_ptr, ptr0, degrees);
|
|
200
|
+
};
|
|
201
|
+
module.exports.selective_color_convert = function(photon_image, ref_color, new_color, fraction) {
|
|
202
|
+
_assertClass(photon_image, PhotonImage);
|
|
203
|
+
_assertClass(ref_color, Rgb);
|
|
204
|
+
var ptr0 = ref_color.__destroy_into_raw();
|
|
205
|
+
_assertClass(new_color, Rgb);
|
|
206
|
+
var ptr1 = new_color.__destroy_into_raw();
|
|
207
|
+
wasm.selective_color_convert(photon_image.__wbg_ptr, ptr0, ptr1, fraction);
|
|
208
|
+
};
|
|
209
|
+
module.exports.selective_lighten = function(img, ref_color, amt) {
|
|
210
|
+
_assertClass(img, PhotonImage);
|
|
211
|
+
_assertClass(ref_color, Rgb);
|
|
212
|
+
var ptr0 = ref_color.__destroy_into_raw();
|
|
213
|
+
wasm.selective_lighten(img.__wbg_ptr, ptr0, amt);
|
|
214
|
+
};
|
|
215
|
+
module.exports.selective_desaturate = function(img, ref_color, amt) {
|
|
216
|
+
_assertClass(img, PhotonImage);
|
|
217
|
+
_assertClass(ref_color, Rgb);
|
|
218
|
+
var ptr0 = ref_color.__destroy_into_raw();
|
|
219
|
+
wasm.selective_desaturate(img.__wbg_ptr, ptr0, amt);
|
|
220
|
+
};
|
|
221
|
+
module.exports.selective_saturate = function(img, ref_color, amt) {
|
|
222
|
+
_assertClass(img, PhotonImage);
|
|
223
|
+
_assertClass(ref_color, Rgb);
|
|
224
|
+
var ptr0 = ref_color.__destroy_into_raw();
|
|
225
|
+
wasm.selective_saturate(img.__wbg_ptr, ptr0, amt);
|
|
226
|
+
};
|
|
227
|
+
module.exports.selective_greyscale = function(photon_image, ref_color) {
|
|
228
|
+
_assertClass(photon_image, PhotonImage);
|
|
229
|
+
var ptr0 = photon_image.__destroy_into_raw();
|
|
230
|
+
_assertClass(ref_color, Rgb);
|
|
231
|
+
var ptr1 = ref_color.__destroy_into_raw();
|
|
232
|
+
wasm.selective_greyscale(ptr0, ptr1);
|
|
233
|
+
};
|
|
234
|
+
module.exports.monochrome = function(img, r_offset, g_offset, b_offset) {
|
|
235
|
+
_assertClass(img, PhotonImage);
|
|
236
|
+
wasm.monochrome(img.__wbg_ptr, r_offset, g_offset, b_offset);
|
|
237
|
+
};
|
|
238
|
+
module.exports.sepia = function(img) {
|
|
239
|
+
_assertClass(img, PhotonImage);
|
|
240
|
+
wasm.sepia(img.__wbg_ptr);
|
|
241
|
+
};
|
|
242
|
+
module.exports.grayscale = function(img) {
|
|
243
|
+
_assertClass(img, PhotonImage);
|
|
244
|
+
wasm.grayscale(img.__wbg_ptr);
|
|
245
|
+
};
|
|
246
|
+
module.exports.grayscale_human_corrected = function(img) {
|
|
247
|
+
_assertClass(img, PhotonImage);
|
|
248
|
+
wasm.grayscale_human_corrected(img.__wbg_ptr);
|
|
249
|
+
};
|
|
250
|
+
module.exports.desaturate = function(img) {
|
|
251
|
+
_assertClass(img, PhotonImage);
|
|
252
|
+
wasm.desaturate(img.__wbg_ptr);
|
|
253
|
+
};
|
|
254
|
+
module.exports.decompose_min = function(img) {
|
|
255
|
+
_assertClass(img, PhotonImage);
|
|
256
|
+
wasm.decompose_min(img.__wbg_ptr);
|
|
257
|
+
};
|
|
258
|
+
module.exports.decompose_max = function(img) {
|
|
259
|
+
_assertClass(img, PhotonImage);
|
|
260
|
+
wasm.decompose_max(img.__wbg_ptr);
|
|
261
|
+
};
|
|
262
|
+
module.exports.grayscale_shades = function(photon_image, num_shades) {
|
|
263
|
+
_assertClass(photon_image, PhotonImage);
|
|
264
|
+
wasm.grayscale_shades(photon_image.__wbg_ptr, num_shades);
|
|
265
|
+
};
|
|
266
|
+
module.exports.r_grayscale = function(photon_image) {
|
|
267
|
+
_assertClass(photon_image, PhotonImage);
|
|
268
|
+
wasm.r_grayscale(photon_image.__wbg_ptr);
|
|
269
|
+
};
|
|
270
|
+
module.exports.g_grayscale = function(photon_image) {
|
|
271
|
+
_assertClass(photon_image, PhotonImage);
|
|
272
|
+
wasm.g_grayscale(photon_image.__wbg_ptr);
|
|
273
|
+
};
|
|
274
|
+
module.exports.b_grayscale = function(photon_image) {
|
|
275
|
+
_assertClass(photon_image, PhotonImage);
|
|
276
|
+
wasm.b_grayscale(photon_image.__wbg_ptr);
|
|
277
|
+
};
|
|
278
|
+
module.exports.single_channel_grayscale = function(photon_image, channel) {
|
|
279
|
+
_assertClass(photon_image, PhotonImage);
|
|
280
|
+
wasm.single_channel_grayscale(photon_image.__wbg_ptr, channel);
|
|
281
|
+
};
|
|
282
|
+
module.exports.threshold = function(img, threshold) {
|
|
283
|
+
_assertClass(img, PhotonImage);
|
|
284
|
+
wasm.threshold(img.__wbg_ptr, threshold);
|
|
285
|
+
};
|
|
286
|
+
module.exports.gamma_correction = function(photon_image, red, green, blue) {
|
|
287
|
+
_assertClass(photon_image, PhotonImage);
|
|
288
|
+
wasm.gamma_correction(photon_image.__wbg_ptr, red, green, blue);
|
|
289
|
+
};
|
|
290
|
+
module.exports.hsluv = function(photon_image, mode, amt) {
|
|
291
|
+
_assertClass(photon_image, PhotonImage);
|
|
292
|
+
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
const len0 = WASM_VECTOR_LEN;
|
|
294
|
+
wasm.hsluv(photon_image.__wbg_ptr, ptr0, len0, amt);
|
|
295
|
+
};
|
|
296
|
+
module.exports.lch = function(photon_image, mode, amt) {
|
|
297
|
+
_assertClass(photon_image, PhotonImage);
|
|
298
|
+
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
299
|
+
const len0 = WASM_VECTOR_LEN;
|
|
300
|
+
wasm.lch(photon_image.__wbg_ptr, ptr0, len0, amt);
|
|
301
|
+
};
|
|
302
|
+
module.exports.hsl = function(photon_image, mode, amt) {
|
|
303
|
+
_assertClass(photon_image, PhotonImage);
|
|
304
|
+
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
305
|
+
const len0 = WASM_VECTOR_LEN;
|
|
306
|
+
wasm.hsl(photon_image.__wbg_ptr, ptr0, len0, amt);
|
|
307
|
+
};
|
|
308
|
+
module.exports.hsv = function(photon_image, mode, amt) {
|
|
309
|
+
_assertClass(photon_image, PhotonImage);
|
|
310
|
+
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
311
|
+
const len0 = WASM_VECTOR_LEN;
|
|
312
|
+
wasm.hsv(photon_image.__wbg_ptr, ptr0, len0, amt);
|
|
313
|
+
};
|
|
314
|
+
module.exports.hue_rotate_hsl = function(img, degrees) {
|
|
315
|
+
_assertClass(img, PhotonImage);
|
|
316
|
+
wasm.hue_rotate_hsl(img.__wbg_ptr, degrees);
|
|
317
|
+
};
|
|
318
|
+
module.exports.hue_rotate_hsv = function(img, degrees) {
|
|
319
|
+
_assertClass(img, PhotonImage);
|
|
320
|
+
wasm.hue_rotate_hsv(img.__wbg_ptr, degrees);
|
|
321
|
+
};
|
|
322
|
+
module.exports.hue_rotate_lch = function(img, degrees) {
|
|
323
|
+
_assertClass(img, PhotonImage);
|
|
324
|
+
wasm.hue_rotate_lch(img.__wbg_ptr, degrees);
|
|
325
|
+
};
|
|
326
|
+
module.exports.hue_rotate_hsluv = function(img, degrees) {
|
|
327
|
+
_assertClass(img, PhotonImage);
|
|
328
|
+
wasm.hue_rotate_hsluv(img.__wbg_ptr, degrees);
|
|
329
|
+
};
|
|
330
|
+
module.exports.saturate_hsl = function(img, level) {
|
|
331
|
+
_assertClass(img, PhotonImage);
|
|
332
|
+
wasm.saturate_hsl(img.__wbg_ptr, level);
|
|
333
|
+
};
|
|
334
|
+
module.exports.saturate_lch = function(img, level) {
|
|
335
|
+
_assertClass(img, PhotonImage);
|
|
336
|
+
wasm.saturate_lch(img.__wbg_ptr, level);
|
|
337
|
+
};
|
|
338
|
+
module.exports.saturate_hsluv = function(img, level) {
|
|
339
|
+
_assertClass(img, PhotonImage);
|
|
340
|
+
wasm.saturate_hsluv(img.__wbg_ptr, level);
|
|
341
|
+
};
|
|
342
|
+
module.exports.saturate_hsv = function(img, level) {
|
|
343
|
+
_assertClass(img, PhotonImage);
|
|
344
|
+
wasm.saturate_hsv(img.__wbg_ptr, level);
|
|
345
|
+
};
|
|
346
|
+
module.exports.lighten_lch = function(img, level) {
|
|
347
|
+
_assertClass(img, PhotonImage);
|
|
348
|
+
wasm.lighten_lch(img.__wbg_ptr, level);
|
|
349
|
+
};
|
|
350
|
+
module.exports.lighten_hsluv = function(img, level) {
|
|
351
|
+
_assertClass(img, PhotonImage);
|
|
352
|
+
wasm.lighten_hsluv(img.__wbg_ptr, level);
|
|
353
|
+
};
|
|
354
|
+
module.exports.lighten_hsl = function(img, level) {
|
|
355
|
+
_assertClass(img, PhotonImage);
|
|
356
|
+
wasm.lighten_hsl(img.__wbg_ptr, level);
|
|
357
|
+
};
|
|
358
|
+
module.exports.lighten_hsv = function(img, level) {
|
|
359
|
+
_assertClass(img, PhotonImage);
|
|
360
|
+
wasm.lighten_hsv(img.__wbg_ptr, level);
|
|
361
|
+
};
|
|
362
|
+
module.exports.darken_lch = function(img, level) {
|
|
363
|
+
_assertClass(img, PhotonImage);
|
|
364
|
+
wasm.darken_lch(img.__wbg_ptr, level);
|
|
365
|
+
};
|
|
366
|
+
module.exports.darken_hsluv = function(img, level) {
|
|
367
|
+
_assertClass(img, PhotonImage);
|
|
368
|
+
wasm.darken_hsluv(img.__wbg_ptr, level);
|
|
369
|
+
};
|
|
370
|
+
module.exports.darken_hsl = function(img, level) {
|
|
371
|
+
_assertClass(img, PhotonImage);
|
|
372
|
+
wasm.darken_hsl(img.__wbg_ptr, level);
|
|
373
|
+
};
|
|
374
|
+
module.exports.darken_hsv = function(img, level) {
|
|
375
|
+
_assertClass(img, PhotonImage);
|
|
376
|
+
wasm.darken_hsv(img.__wbg_ptr, level);
|
|
377
|
+
};
|
|
378
|
+
module.exports.desaturate_hsv = function(img, level) {
|
|
379
|
+
_assertClass(img, PhotonImage);
|
|
380
|
+
wasm.desaturate_hsv(img.__wbg_ptr, level);
|
|
381
|
+
};
|
|
382
|
+
module.exports.desaturate_hsl = function(img, level) {
|
|
383
|
+
_assertClass(img, PhotonImage);
|
|
384
|
+
wasm.desaturate_hsl(img.__wbg_ptr, level);
|
|
385
|
+
};
|
|
386
|
+
module.exports.desaturate_lch = function(img, level) {
|
|
387
|
+
_assertClass(img, PhotonImage);
|
|
388
|
+
wasm.desaturate_lch(img.__wbg_ptr, level);
|
|
389
|
+
};
|
|
390
|
+
module.exports.desaturate_hsluv = function(img, level) {
|
|
391
|
+
_assertClass(img, PhotonImage);
|
|
392
|
+
wasm.desaturate_hsluv(img.__wbg_ptr, level);
|
|
393
|
+
};
|
|
394
|
+
module.exports.mix_with_colour = function(photon_image, mix_colour, opacity) {
|
|
395
|
+
_assertClass(photon_image, PhotonImage);
|
|
396
|
+
_assertClass(mix_colour, Rgb);
|
|
397
|
+
var ptr0 = mix_colour.__destroy_into_raw();
|
|
398
|
+
wasm.mix_with_colour(photon_image.__wbg_ptr, ptr0, opacity);
|
|
399
|
+
};
|
|
400
|
+
module.exports.noise_reduction = function(photon_image) {
|
|
401
|
+
_assertClass(photon_image, PhotonImage);
|
|
402
|
+
wasm.noise_reduction(photon_image.__wbg_ptr);
|
|
403
|
+
};
|
|
404
|
+
module.exports.sharpen = function(photon_image) {
|
|
405
|
+
_assertClass(photon_image, PhotonImage);
|
|
406
|
+
wasm.sharpen(photon_image.__wbg_ptr);
|
|
407
|
+
};
|
|
408
|
+
module.exports.edge_detection = function(photon_image) {
|
|
409
|
+
_assertClass(photon_image, PhotonImage);
|
|
410
|
+
wasm.edge_detection(photon_image.__wbg_ptr);
|
|
411
|
+
};
|
|
412
|
+
module.exports.identity = function(photon_image) {
|
|
413
|
+
_assertClass(photon_image, PhotonImage);
|
|
414
|
+
wasm.identity(photon_image.__wbg_ptr);
|
|
415
|
+
};
|
|
416
|
+
module.exports.box_blur = function(photon_image) {
|
|
417
|
+
_assertClass(photon_image, PhotonImage);
|
|
418
|
+
wasm.box_blur(photon_image.__wbg_ptr);
|
|
419
|
+
};
|
|
420
|
+
module.exports.gaussian_blur = function(photon_image, radius) {
|
|
421
|
+
_assertClass(photon_image, PhotonImage);
|
|
422
|
+
wasm.gaussian_blur(photon_image.__wbg_ptr, radius);
|
|
423
|
+
};
|
|
424
|
+
module.exports.detect_horizontal_lines = function(photon_image) {
|
|
425
|
+
_assertClass(photon_image, PhotonImage);
|
|
426
|
+
wasm.detect_horizontal_lines(photon_image.__wbg_ptr);
|
|
427
|
+
};
|
|
428
|
+
module.exports.detect_vertical_lines = function(photon_image) {
|
|
429
|
+
_assertClass(photon_image, PhotonImage);
|
|
430
|
+
wasm.detect_vertical_lines(photon_image.__wbg_ptr);
|
|
431
|
+
};
|
|
432
|
+
module.exports.detect_45_deg_lines = function(photon_image) {
|
|
433
|
+
_assertClass(photon_image, PhotonImage);
|
|
434
|
+
wasm.detect_45_deg_lines(photon_image.__wbg_ptr);
|
|
435
|
+
};
|
|
436
|
+
module.exports.detect_135_deg_lines = function(photon_image) {
|
|
437
|
+
_assertClass(photon_image, PhotonImage);
|
|
438
|
+
wasm.detect_135_deg_lines(photon_image.__wbg_ptr);
|
|
439
|
+
};
|
|
440
|
+
module.exports.laplace = function(photon_image) {
|
|
441
|
+
_assertClass(photon_image, PhotonImage);
|
|
442
|
+
wasm.laplace(photon_image.__wbg_ptr);
|
|
443
|
+
};
|
|
444
|
+
module.exports.edge_one = function(photon_image) {
|
|
445
|
+
_assertClass(photon_image, PhotonImage);
|
|
446
|
+
wasm.edge_one(photon_image.__wbg_ptr);
|
|
447
|
+
};
|
|
448
|
+
module.exports.emboss = function(photon_image) {
|
|
449
|
+
_assertClass(photon_image, PhotonImage);
|
|
450
|
+
wasm.emboss(photon_image.__wbg_ptr);
|
|
451
|
+
};
|
|
452
|
+
module.exports.sobel_horizontal = function(photon_image) {
|
|
453
|
+
_assertClass(photon_image, PhotonImage);
|
|
454
|
+
wasm.sobel_horizontal(photon_image.__wbg_ptr);
|
|
455
|
+
};
|
|
456
|
+
module.exports.prewitt_horizontal = function(photon_image) {
|
|
457
|
+
_assertClass(photon_image, PhotonImage);
|
|
458
|
+
wasm.prewitt_horizontal(photon_image.__wbg_ptr);
|
|
459
|
+
};
|
|
460
|
+
module.exports.sobel_vertical = function(photon_image) {
|
|
461
|
+
_assertClass(photon_image, PhotonImage);
|
|
462
|
+
wasm.sobel_vertical(photon_image.__wbg_ptr);
|
|
463
|
+
};
|
|
464
|
+
module.exports.sobel_global = function(photon_image) {
|
|
465
|
+
_assertClass(photon_image, PhotonImage);
|
|
466
|
+
wasm.sobel_global(photon_image.__wbg_ptr);
|
|
467
|
+
};
|
|
468
|
+
module.exports.add_noise_rand = function(photon_image) {
|
|
469
|
+
_assertClass(photon_image, PhotonImage);
|
|
470
|
+
wasm.add_noise_rand(photon_image.__wbg_ptr);
|
|
471
|
+
};
|
|
472
|
+
module.exports.pink_noise = function(photon_image) {
|
|
473
|
+
_assertClass(photon_image, PhotonImage);
|
|
474
|
+
wasm.pink_noise(photon_image.__wbg_ptr);
|
|
475
|
+
};
|
|
476
|
+
module.exports.watermark = function(img, watermark, x, y) {
|
|
477
|
+
_assertClass(img, PhotonImage);
|
|
478
|
+
_assertClass(watermark, PhotonImage);
|
|
479
|
+
wasm.watermark(img.__wbg_ptr, watermark.__wbg_ptr, x, y);
|
|
480
|
+
};
|
|
481
|
+
module.exports.blend = function(photon_image, photon_image2, blend_mode) {
|
|
482
|
+
_assertClass(photon_image, PhotonImage);
|
|
483
|
+
_assertClass(photon_image2, PhotonImage);
|
|
484
|
+
const ptr0 = passStringToWasm0(blend_mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
485
|
+
const len0 = WASM_VECTOR_LEN;
|
|
486
|
+
wasm.blend(photon_image.__wbg_ptr, photon_image2.__wbg_ptr, ptr0, len0);
|
|
487
|
+
};
|
|
488
|
+
module.exports.create_gradient = function(width, height) {
|
|
489
|
+
const ret = wasm.create_gradient(width, height);
|
|
490
|
+
return PhotonImage.__wrap(ret);
|
|
491
|
+
};
|
|
492
|
+
module.exports.apply_gradient = function(image) {
|
|
493
|
+
_assertClass(image, PhotonImage);
|
|
494
|
+
wasm.apply_gradient(image.__wbg_ptr);
|
|
495
|
+
};
|
|
496
|
+
module.exports.neue = function(photon_image) {
|
|
497
|
+
_assertClass(photon_image, PhotonImage);
|
|
498
|
+
wasm.neue(photon_image.__wbg_ptr);
|
|
499
|
+
};
|
|
500
|
+
module.exports.lix = function(photon_image) {
|
|
501
|
+
_assertClass(photon_image, PhotonImage);
|
|
502
|
+
wasm.lix(photon_image.__wbg_ptr);
|
|
503
|
+
};
|
|
504
|
+
module.exports.ryo = function(photon_image) {
|
|
505
|
+
_assertClass(photon_image, PhotonImage);
|
|
506
|
+
wasm.ryo(photon_image.__wbg_ptr);
|
|
507
|
+
};
|
|
508
|
+
module.exports.filter = function(img, filter_name) {
|
|
509
|
+
_assertClass(img, PhotonImage);
|
|
510
|
+
const ptr0 = passStringToWasm0(filter_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
511
|
+
const len0 = WASM_VECTOR_LEN;
|
|
512
|
+
wasm.filter(img.__wbg_ptr, ptr0, len0);
|
|
513
|
+
};
|
|
514
|
+
module.exports.lofi = function(img) {
|
|
515
|
+
_assertClass(img, PhotonImage);
|
|
516
|
+
wasm.lofi(img.__wbg_ptr);
|
|
517
|
+
};
|
|
518
|
+
module.exports.pastel_pink = function(img) {
|
|
519
|
+
_assertClass(img, PhotonImage);
|
|
520
|
+
wasm.pastel_pink(img.__wbg_ptr);
|
|
521
|
+
};
|
|
522
|
+
module.exports.golden = function(img) {
|
|
523
|
+
_assertClass(img, PhotonImage);
|
|
524
|
+
wasm.golden(img.__wbg_ptr);
|
|
525
|
+
};
|
|
526
|
+
module.exports.cali = function(img) {
|
|
527
|
+
_assertClass(img, PhotonImage);
|
|
528
|
+
wasm.cali(img.__wbg_ptr);
|
|
529
|
+
};
|
|
530
|
+
module.exports.dramatic = function(img) {
|
|
531
|
+
_assertClass(img, PhotonImage);
|
|
532
|
+
wasm.dramatic(img.__wbg_ptr);
|
|
533
|
+
};
|
|
534
|
+
module.exports.monochrome_tint = function(img, rgb_color) {
|
|
535
|
+
_assertClass(img, PhotonImage);
|
|
536
|
+
_assertClass(rgb_color, Rgb);
|
|
537
|
+
var ptr0 = rgb_color.__destroy_into_raw();
|
|
538
|
+
wasm.monochrome_tint(img.__wbg_ptr, ptr0);
|
|
539
|
+
};
|
|
540
|
+
module.exports.duotone_violette = function(img) {
|
|
541
|
+
_assertClass(img, PhotonImage);
|
|
542
|
+
wasm.duotone_violette(img.__wbg_ptr);
|
|
543
|
+
};
|
|
544
|
+
module.exports.duotone_horizon = function(img) {
|
|
545
|
+
_assertClass(img, PhotonImage);
|
|
546
|
+
wasm.duotone_horizon(img.__wbg_ptr);
|
|
547
|
+
};
|
|
548
|
+
module.exports.duotone_tint = function(img, rgb_color) {
|
|
549
|
+
_assertClass(img, PhotonImage);
|
|
550
|
+
_assertClass(rgb_color, Rgb);
|
|
551
|
+
var ptr0 = rgb_color.__destroy_into_raw();
|
|
552
|
+
wasm.duotone_tint(img.__wbg_ptr, ptr0);
|
|
553
|
+
};
|
|
554
|
+
module.exports.duotone_lilac = function(img) {
|
|
555
|
+
_assertClass(img, PhotonImage);
|
|
556
|
+
wasm.duotone_lilac(img.__wbg_ptr);
|
|
557
|
+
};
|
|
558
|
+
module.exports.duotone_ochre = function(img) {
|
|
559
|
+
_assertClass(img, PhotonImage);
|
|
560
|
+
wasm.duotone_ochre(img.__wbg_ptr);
|
|
561
|
+
};
|
|
562
|
+
module.exports.firenze = function(img) {
|
|
563
|
+
_assertClass(img, PhotonImage);
|
|
564
|
+
wasm.firenze(img.__wbg_ptr);
|
|
565
|
+
};
|
|
566
|
+
module.exports.obsidian = function(img) {
|
|
567
|
+
_assertClass(img, PhotonImage);
|
|
568
|
+
wasm.obsidian(img.__wbg_ptr);
|
|
569
|
+
};
|
|
570
|
+
module.exports.crop = function(photon_image, x1, y1, x2, y2) {
|
|
571
|
+
_assertClass(photon_image, PhotonImage);
|
|
572
|
+
const ret = wasm.crop(photon_image.__wbg_ptr, x1, y1, x2, y2);
|
|
573
|
+
return PhotonImage.__wrap(ret);
|
|
574
|
+
};
|
|
575
|
+
module.exports.crop_img_browser = function(source_canvas, width, height, left, top) {
|
|
576
|
+
const ret = wasm.crop_img_browser(source_canvas, width, height, left, top);
|
|
577
|
+
return ret;
|
|
578
|
+
};
|
|
579
|
+
module.exports.fliph = function(photon_image) {
|
|
580
|
+
_assertClass(photon_image, PhotonImage);
|
|
581
|
+
wasm.fliph(photon_image.__wbg_ptr);
|
|
582
|
+
};
|
|
583
|
+
module.exports.flipv = function(photon_image) {
|
|
584
|
+
_assertClass(photon_image, PhotonImage);
|
|
585
|
+
wasm.flipv(photon_image.__wbg_ptr);
|
|
586
|
+
};
|
|
587
|
+
module.exports.resize_img_browser = function(photon_img, width, height, sampling_filter) {
|
|
588
|
+
_assertClass(photon_img, PhotonImage);
|
|
589
|
+
const ret = wasm.resize_img_browser(photon_img.__wbg_ptr, width, height, sampling_filter);
|
|
590
|
+
return ret;
|
|
591
|
+
};
|
|
592
|
+
module.exports.resize = function(photon_img, width, height, sampling_filter) {
|
|
593
|
+
_assertClass(photon_img, PhotonImage);
|
|
594
|
+
const ret = wasm.resize(photon_img.__wbg_ptr, width, height, sampling_filter);
|
|
595
|
+
return PhotonImage.__wrap(ret);
|
|
596
|
+
};
|
|
597
|
+
module.exports.seam_carve = function(img, width, height) {
|
|
598
|
+
_assertClass(img, PhotonImage);
|
|
599
|
+
const ret = wasm.seam_carve(img.__wbg_ptr, width, height);
|
|
600
|
+
return PhotonImage.__wrap(ret);
|
|
601
|
+
};
|
|
602
|
+
module.exports.shearx = function(photon_img, shear) {
|
|
603
|
+
_assertClass(photon_img, PhotonImage);
|
|
604
|
+
const ret = wasm.shearx(photon_img.__wbg_ptr, shear);
|
|
605
|
+
return PhotonImage.__wrap(ret);
|
|
606
|
+
};
|
|
607
|
+
module.exports.sheary = function(photon_img, shear) {
|
|
608
|
+
_assertClass(photon_img, PhotonImage);
|
|
609
|
+
const ret = wasm.sheary(photon_img.__wbg_ptr, shear);
|
|
610
|
+
return PhotonImage.__wrap(ret);
|
|
611
|
+
};
|
|
612
|
+
module.exports.padding_uniform = function(img, padding, padding_rgba) {
|
|
613
|
+
_assertClass(img, PhotonImage);
|
|
614
|
+
_assertClass(padding_rgba, Rgba);
|
|
615
|
+
var ptr0 = padding_rgba.__destroy_into_raw();
|
|
616
|
+
const ret = wasm.padding_uniform(img.__wbg_ptr, padding, ptr0);
|
|
617
|
+
return PhotonImage.__wrap(ret);
|
|
618
|
+
};
|
|
619
|
+
module.exports.padding_left = function(img, padding, padding_rgba) {
|
|
620
|
+
_assertClass(img, PhotonImage);
|
|
621
|
+
_assertClass(padding_rgba, Rgba);
|
|
622
|
+
var ptr0 = padding_rgba.__destroy_into_raw();
|
|
623
|
+
const ret = wasm.padding_left(img.__wbg_ptr, padding, ptr0);
|
|
624
|
+
return PhotonImage.__wrap(ret);
|
|
625
|
+
};
|
|
626
|
+
module.exports.padding_right = function(img, padding, padding_rgba) {
|
|
627
|
+
_assertClass(img, PhotonImage);
|
|
628
|
+
_assertClass(padding_rgba, Rgba);
|
|
629
|
+
var ptr0 = padding_rgba.__destroy_into_raw();
|
|
630
|
+
const ret = wasm.padding_right(img.__wbg_ptr, padding, ptr0);
|
|
631
|
+
return PhotonImage.__wrap(ret);
|
|
632
|
+
};
|
|
633
|
+
module.exports.padding_top = function(img, padding, padding_rgba) {
|
|
634
|
+
_assertClass(img, PhotonImage);
|
|
635
|
+
_assertClass(padding_rgba, Rgba);
|
|
636
|
+
var ptr0 = padding_rgba.__destroy_into_raw();
|
|
637
|
+
const ret = wasm.padding_top(img.__wbg_ptr, padding, ptr0);
|
|
638
|
+
return PhotonImage.__wrap(ret);
|
|
639
|
+
};
|
|
640
|
+
module.exports.padding_bottom = function(img, padding, padding_rgba) {
|
|
641
|
+
_assertClass(img, PhotonImage);
|
|
642
|
+
_assertClass(padding_rgba, Rgba);
|
|
643
|
+
var ptr0 = padding_rgba.__destroy_into_raw();
|
|
644
|
+
const ret = wasm.padding_bottom(img.__wbg_ptr, padding, ptr0);
|
|
645
|
+
return PhotonImage.__wrap(ret);
|
|
646
|
+
};
|
|
647
|
+
module.exports.rotate = function(photon_img, angle) {
|
|
648
|
+
_assertClass(photon_img, PhotonImage);
|
|
649
|
+
const ret = wasm.rotate(photon_img.__wbg_ptr, angle);
|
|
650
|
+
return PhotonImage.__wrap(ret);
|
|
651
|
+
};
|
|
652
|
+
module.exports.resample = function(img, dst_width, dst_height) {
|
|
653
|
+
_assertClass(img, PhotonImage);
|
|
654
|
+
const ret = wasm.resample(img.__wbg_ptr, dst_width, dst_height);
|
|
655
|
+
return PhotonImage.__wrap(ret);
|
|
656
|
+
};
|
|
657
|
+
module.exports.offset = function(photon_image, channel_index, offset) {
|
|
658
|
+
_assertClass(photon_image, PhotonImage);
|
|
659
|
+
wasm.offset(photon_image.__wbg_ptr, channel_index, offset);
|
|
660
|
+
};
|
|
661
|
+
module.exports.offset_red = function(img, offset_amt) {
|
|
662
|
+
_assertClass(img, PhotonImage);
|
|
663
|
+
wasm.offset_red(img.__wbg_ptr, offset_amt);
|
|
664
|
+
};
|
|
665
|
+
module.exports.offset_green = function(img, offset_amt) {
|
|
666
|
+
_assertClass(img, PhotonImage);
|
|
667
|
+
wasm.offset_green(img.__wbg_ptr, offset_amt);
|
|
668
|
+
};
|
|
669
|
+
module.exports.offset_blue = function(img, offset_amt) {
|
|
670
|
+
_assertClass(img, PhotonImage);
|
|
671
|
+
wasm.offset_blue(img.__wbg_ptr, offset_amt);
|
|
672
|
+
};
|
|
673
|
+
module.exports.multiple_offsets = function(photon_image, offset, channel_index, channel_index2) {
|
|
674
|
+
_assertClass(photon_image, PhotonImage);
|
|
675
|
+
wasm.multiple_offsets(photon_image.__wbg_ptr, offset, channel_index, channel_index2);
|
|
676
|
+
};
|
|
677
|
+
module.exports.halftone = function(photon_image) {
|
|
678
|
+
_assertClass(photon_image, PhotonImage);
|
|
679
|
+
wasm.halftone(photon_image.__wbg_ptr);
|
|
680
|
+
};
|
|
681
|
+
module.exports.primary = function(img) {
|
|
682
|
+
_assertClass(img, PhotonImage);
|
|
683
|
+
wasm.primary(img.__wbg_ptr);
|
|
684
|
+
};
|
|
685
|
+
module.exports.colorize = function(photon_image) {
|
|
686
|
+
_assertClass(photon_image, PhotonImage);
|
|
687
|
+
wasm.colorize(photon_image.__wbg_ptr);
|
|
688
|
+
};
|
|
689
|
+
module.exports.solarize = function(photon_image) {
|
|
690
|
+
_assertClass(photon_image, PhotonImage);
|
|
691
|
+
wasm.solarize(photon_image.__wbg_ptr);
|
|
692
|
+
};
|
|
693
|
+
module.exports.solarize_retimg = function(photon_image) {
|
|
694
|
+
_assertClass(photon_image, PhotonImage);
|
|
695
|
+
const ret = wasm.solarize_retimg(photon_image.__wbg_ptr);
|
|
696
|
+
return PhotonImage.__wrap(ret);
|
|
697
|
+
};
|
|
698
|
+
module.exports.adjust_brightness = function(photon_image, brightness) {
|
|
699
|
+
_assertClass(photon_image, PhotonImage);
|
|
700
|
+
wasm.adjust_brightness(photon_image.__wbg_ptr, brightness);
|
|
701
|
+
};
|
|
702
|
+
module.exports.inc_brightness = function(photon_image, brightness) {
|
|
703
|
+
_assertClass(photon_image, PhotonImage);
|
|
704
|
+
wasm.inc_brightness(photon_image.__wbg_ptr, brightness);
|
|
705
|
+
};
|
|
706
|
+
module.exports.dec_brightness = function(photon_image, brightness) {
|
|
707
|
+
_assertClass(photon_image, PhotonImage);
|
|
708
|
+
wasm.dec_brightness(photon_image.__wbg_ptr, brightness);
|
|
709
|
+
};
|
|
710
|
+
module.exports.adjust_contrast = function(photon_image, contrast) {
|
|
711
|
+
_assertClass(photon_image, PhotonImage);
|
|
712
|
+
wasm.adjust_contrast(photon_image.__wbg_ptr, contrast);
|
|
713
|
+
};
|
|
714
|
+
module.exports.tint = function(photon_image, r_offset, g_offset, b_offset) {
|
|
715
|
+
_assertClass(photon_image, PhotonImage);
|
|
716
|
+
wasm.tint(photon_image.__wbg_ptr, r_offset, g_offset, b_offset);
|
|
717
|
+
};
|
|
718
|
+
module.exports.horizontal_strips = function(photon_image, num_strips) {
|
|
719
|
+
_assertClass(photon_image, PhotonImage);
|
|
720
|
+
wasm.horizontal_strips(photon_image.__wbg_ptr, num_strips);
|
|
721
|
+
};
|
|
722
|
+
module.exports.color_horizontal_strips = function(photon_image, num_strips, color) {
|
|
723
|
+
_assertClass(photon_image, PhotonImage);
|
|
724
|
+
_assertClass(color, Rgb);
|
|
725
|
+
var ptr0 = color.__destroy_into_raw();
|
|
726
|
+
wasm.color_horizontal_strips(photon_image.__wbg_ptr, num_strips, ptr0);
|
|
727
|
+
};
|
|
728
|
+
module.exports.vertical_strips = function(photon_image, num_strips) {
|
|
729
|
+
_assertClass(photon_image, PhotonImage);
|
|
730
|
+
wasm.vertical_strips(photon_image.__wbg_ptr, num_strips);
|
|
731
|
+
};
|
|
732
|
+
module.exports.color_vertical_strips = function(photon_image, num_strips, color) {
|
|
733
|
+
_assertClass(photon_image, PhotonImage);
|
|
734
|
+
_assertClass(color, Rgb);
|
|
735
|
+
var ptr0 = color.__destroy_into_raw();
|
|
736
|
+
wasm.color_vertical_strips(photon_image.__wbg_ptr, num_strips, ptr0);
|
|
737
|
+
};
|
|
738
|
+
module.exports.oil = function(photon_image, radius, intensity) {
|
|
739
|
+
_assertClass(photon_image, PhotonImage);
|
|
740
|
+
wasm.oil(photon_image.__wbg_ptr, radius, intensity);
|
|
741
|
+
};
|
|
742
|
+
module.exports.frosted_glass = function(photon_image) {
|
|
743
|
+
_assertClass(photon_image, PhotonImage);
|
|
744
|
+
wasm.frosted_glass(photon_image.__wbg_ptr);
|
|
745
|
+
};
|
|
746
|
+
module.exports.pixelize = function(photon_image, pixel_size) {
|
|
747
|
+
_assertClass(photon_image, PhotonImage);
|
|
748
|
+
wasm.pixelize(photon_image.__wbg_ptr, pixel_size);
|
|
749
|
+
};
|
|
750
|
+
module.exports.normalize = function(photon_image) {
|
|
751
|
+
_assertClass(photon_image, PhotonImage);
|
|
752
|
+
wasm.normalize(photon_image.__wbg_ptr);
|
|
753
|
+
};
|
|
754
|
+
module.exports.dither = function(photon_image, depth) {
|
|
755
|
+
_assertClass(photon_image, PhotonImage);
|
|
756
|
+
wasm.dither(photon_image.__wbg_ptr, depth);
|
|
757
|
+
};
|
|
758
|
+
module.exports.duotone = function(photon_image, color_a, color_b) {
|
|
759
|
+
_assertClass(photon_image, PhotonImage);
|
|
760
|
+
_assertClass(color_a, Rgb);
|
|
761
|
+
var ptr0 = color_a.__destroy_into_raw();
|
|
762
|
+
_assertClass(color_b, Rgb);
|
|
763
|
+
var ptr1 = color_b.__destroy_into_raw();
|
|
764
|
+
wasm.duotone(photon_image.__wbg_ptr, ptr0, ptr1);
|
|
765
|
+
};
|
|
766
|
+
module.exports.draw_text_with_border = function(photon_img, text, x, y, font_size) {
|
|
767
|
+
_assertClass(photon_img, PhotonImage);
|
|
768
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
769
|
+
const len0 = WASM_VECTOR_LEN;
|
|
770
|
+
wasm.draw_text_with_border(photon_img.__wbg_ptr, ptr0, len0, x, y, font_size);
|
|
771
|
+
};
|
|
772
|
+
module.exports.draw_text = function(photon_img, text, x, y, font_size) {
|
|
773
|
+
_assertClass(photon_img, PhotonImage);
|
|
774
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
775
|
+
const len0 = WASM_VECTOR_LEN;
|
|
776
|
+
wasm.draw_text(photon_img.__wbg_ptr, ptr0, len0, x, y, font_size);
|
|
777
|
+
};
|
|
778
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
779
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
780
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
781
|
+
WASM_VECTOR_LEN = arg.length;
|
|
782
|
+
return ptr;
|
|
783
|
+
}
|
|
784
|
+
__name(passArray8ToWasm0, "passArray8ToWasm0");
|
|
785
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
786
|
+
ptr = ptr >>> 0;
|
|
787
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
788
|
+
}
|
|
789
|
+
__name(getArrayU8FromWasm0, "getArrayU8FromWasm0");
|
|
790
|
+
function takeFromExternrefTable0(idx) {
|
|
791
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
792
|
+
wasm.__externref_table_dealloc(idx);
|
|
793
|
+
return value;
|
|
794
|
+
}
|
|
795
|
+
__name(takeFromExternrefTable0, "takeFromExternrefTable0");
|
|
796
|
+
module.exports.run = function() {
|
|
797
|
+
const ret = wasm.run();
|
|
798
|
+
if (ret[1]) {
|
|
799
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
module.exports.get_image_data = function(canvas, ctx) {
|
|
803
|
+
const ret = wasm.get_image_data(canvas, ctx);
|
|
804
|
+
return ret;
|
|
805
|
+
};
|
|
806
|
+
module.exports.putImageData = function(canvas, ctx, new_image) {
|
|
807
|
+
_assertClass(new_image, PhotonImage);
|
|
808
|
+
var ptr0 = new_image.__destroy_into_raw();
|
|
809
|
+
wasm.putImageData(canvas, ctx, ptr0);
|
|
810
|
+
};
|
|
811
|
+
module.exports.open_image = function(canvas, ctx) {
|
|
812
|
+
const ret = wasm.open_image(canvas, ctx);
|
|
813
|
+
return PhotonImage.__wrap(ret);
|
|
814
|
+
};
|
|
815
|
+
module.exports.to_raw_pixels = function(imgdata) {
|
|
816
|
+
const ret = wasm.to_raw_pixels(imgdata);
|
|
817
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
818
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
819
|
+
return v1;
|
|
820
|
+
};
|
|
821
|
+
module.exports.base64_to_image = function(base64) {
|
|
822
|
+
const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
823
|
+
const len0 = WASM_VECTOR_LEN;
|
|
824
|
+
const ret = wasm.base64_to_image(ptr0, len0);
|
|
825
|
+
return PhotonImage.__wrap(ret);
|
|
826
|
+
};
|
|
827
|
+
module.exports.base64_to_vec = function(base64) {
|
|
828
|
+
const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
829
|
+
const len0 = WASM_VECTOR_LEN;
|
|
830
|
+
const ret = wasm.base64_to_vec(ptr0, len0);
|
|
831
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
832
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
833
|
+
return v2;
|
|
834
|
+
};
|
|
835
|
+
module.exports.to_image_data = function(photon_image) {
|
|
836
|
+
_assertClass(photon_image, PhotonImage);
|
|
837
|
+
var ptr0 = photon_image.__destroy_into_raw();
|
|
838
|
+
const ret = wasm.to_image_data(ptr0);
|
|
839
|
+
return ret;
|
|
840
|
+
};
|
|
841
|
+
function isLikeNone(x) {
|
|
842
|
+
return x === void 0 || x === null;
|
|
843
|
+
}
|
|
844
|
+
__name(isLikeNone, "isLikeNone");
|
|
845
|
+
function addToExternrefTable0(obj) {
|
|
846
|
+
const idx = wasm.__externref_table_alloc();
|
|
847
|
+
wasm.__wbindgen_export_2.set(idx, obj);
|
|
848
|
+
return idx;
|
|
849
|
+
}
|
|
850
|
+
__name(addToExternrefTable0, "addToExternrefTable0");
|
|
851
|
+
function handleError(f, args) {
|
|
852
|
+
try {
|
|
853
|
+
return f.apply(this, args);
|
|
854
|
+
} catch (e) {
|
|
855
|
+
const idx = addToExternrefTable0(e);
|
|
856
|
+
wasm.__wbindgen_exn_store(idx);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
__name(handleError, "handleError");
|
|
860
|
+
var cachedUint8ClampedArrayMemory0 = null;
|
|
861
|
+
function getUint8ClampedArrayMemory0() {
|
|
862
|
+
if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) {
|
|
863
|
+
cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
|
|
864
|
+
}
|
|
865
|
+
return cachedUint8ClampedArrayMemory0;
|
|
866
|
+
}
|
|
867
|
+
__name(getUint8ClampedArrayMemory0, "getUint8ClampedArrayMemory0");
|
|
868
|
+
function getClampedArrayU8FromWasm0(ptr, len) {
|
|
869
|
+
ptr = ptr >>> 0;
|
|
870
|
+
return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
871
|
+
}
|
|
872
|
+
__name(getClampedArrayU8FromWasm0, "getClampedArrayU8FromWasm0");
|
|
873
|
+
module.exports.SamplingFilter = Object.freeze({ Nearest: 1, "1": "Nearest", Triangle: 2, "2": "Triangle", CatmullRom: 3, "3": "CatmullRom", Gaussian: 4, "4": "Gaussian", Lanczos3: 5, "5": "Lanczos3" });
|
|
874
|
+
var PhotonImageFinalization = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
|
|
875
|
+
}, "register"), unregister: /* @__PURE__ */ __name(() => {
|
|
876
|
+
}, "unregister") } : new FinalizationRegistry((ptr) => wasm.__wbg_photonimage_free(ptr >>> 0, 1));
|
|
877
|
+
var PhotonImage = class _PhotonImage {
|
|
878
|
+
static {
|
|
879
|
+
__name(this, "PhotonImage");
|
|
880
|
+
}
|
|
881
|
+
static __wrap(ptr) {
|
|
882
|
+
ptr = ptr >>> 0;
|
|
883
|
+
const obj = Object.create(_PhotonImage.prototype);
|
|
884
|
+
obj.__wbg_ptr = ptr;
|
|
885
|
+
PhotonImageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
886
|
+
return obj;
|
|
887
|
+
}
|
|
888
|
+
__destroy_into_raw() {
|
|
889
|
+
const ptr = this.__wbg_ptr;
|
|
890
|
+
this.__wbg_ptr = 0;
|
|
891
|
+
PhotonImageFinalization.unregister(this);
|
|
892
|
+
return ptr;
|
|
893
|
+
}
|
|
894
|
+
free() {
|
|
895
|
+
const ptr = this.__destroy_into_raw();
|
|
896
|
+
wasm.__wbg_photonimage_free(ptr, 0);
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Create a new PhotonImage from a Vec of u8s, which represent raw pixels.
|
|
900
|
+
* @param {Uint8Array} raw_pixels
|
|
901
|
+
* @param {number} width
|
|
902
|
+
* @param {number} height
|
|
903
|
+
*/
|
|
904
|
+
constructor(raw_pixels, width, height) {
|
|
905
|
+
const ptr0 = passArray8ToWasm0(raw_pixels, wasm.__wbindgen_malloc);
|
|
906
|
+
const len0 = WASM_VECTOR_LEN;
|
|
907
|
+
const ret = wasm.photonimage_new(ptr0, len0, width, height);
|
|
908
|
+
this.__wbg_ptr = ret >>> 0;
|
|
909
|
+
PhotonImageFinalization.register(this, this.__wbg_ptr, this);
|
|
910
|
+
return this;
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Create a new PhotonImage from a base64 string.
|
|
914
|
+
* @param {string} base64
|
|
915
|
+
* @returns {PhotonImage}
|
|
916
|
+
*/
|
|
917
|
+
static new_from_base64(base64) {
|
|
918
|
+
const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
919
|
+
const len0 = WASM_VECTOR_LEN;
|
|
920
|
+
const ret = wasm.base64_to_image(ptr0, len0);
|
|
921
|
+
return _PhotonImage.__wrap(ret);
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* Create a new PhotonImage from a byteslice.
|
|
925
|
+
* @param {Uint8Array} vec
|
|
926
|
+
* @returns {PhotonImage}
|
|
927
|
+
*/
|
|
928
|
+
static new_from_byteslice(vec) {
|
|
929
|
+
const ptr0 = passArray8ToWasm0(vec, wasm.__wbindgen_malloc);
|
|
930
|
+
const len0 = WASM_VECTOR_LEN;
|
|
931
|
+
const ret = wasm.photonimage_new_from_byteslice(ptr0, len0);
|
|
932
|
+
return _PhotonImage.__wrap(ret);
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Create a new PhotonImage from a Blob/File.
|
|
936
|
+
* @param {Blob} blob
|
|
937
|
+
* @returns {PhotonImage}
|
|
938
|
+
*/
|
|
939
|
+
static new_from_blob(blob) {
|
|
940
|
+
const ret = wasm.photonimage_new_from_blob(blob);
|
|
941
|
+
return _PhotonImage.__wrap(ret);
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Create a new PhotonImage from a HTMLImageElement
|
|
945
|
+
* @param {HTMLImageElement} image
|
|
946
|
+
* @returns {PhotonImage}
|
|
947
|
+
*/
|
|
948
|
+
static new_from_image(image) {
|
|
949
|
+
const ret = wasm.photonimage_new_from_image(image);
|
|
950
|
+
return _PhotonImage.__wrap(ret);
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Get the width of the PhotonImage.
|
|
954
|
+
* @returns {number}
|
|
955
|
+
*/
|
|
956
|
+
get_width() {
|
|
957
|
+
const ret = wasm.photonimage_get_width(this.__wbg_ptr);
|
|
958
|
+
return ret >>> 0;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Get the PhotonImage's pixels as a Vec of u8s.
|
|
962
|
+
* @returns {Uint8Array}
|
|
963
|
+
*/
|
|
964
|
+
get_raw_pixels() {
|
|
965
|
+
const ret = wasm.photonimage_get_raw_pixels(this.__wbg_ptr);
|
|
966
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
967
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
968
|
+
return v1;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Get the height of the PhotonImage.
|
|
972
|
+
* @returns {number}
|
|
973
|
+
*/
|
|
974
|
+
get_height() {
|
|
975
|
+
const ret = wasm.photonimage_get_height(this.__wbg_ptr);
|
|
976
|
+
return ret >>> 0;
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Convert the PhotonImage to base64.
|
|
980
|
+
* @returns {string}
|
|
981
|
+
*/
|
|
982
|
+
get_base64() {
|
|
983
|
+
let deferred1_0;
|
|
984
|
+
let deferred1_1;
|
|
985
|
+
try {
|
|
986
|
+
const ret = wasm.photonimage_get_base64(this.__wbg_ptr);
|
|
987
|
+
deferred1_0 = ret[0];
|
|
988
|
+
deferred1_1 = ret[1];
|
|
989
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
990
|
+
} finally {
|
|
991
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Convert the PhotonImage to raw bytes. Returns PNG.
|
|
996
|
+
* @returns {Uint8Array}
|
|
997
|
+
*/
|
|
998
|
+
get_bytes() {
|
|
999
|
+
const ret = wasm.photonimage_get_bytes(this.__wbg_ptr);
|
|
1000
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1001
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1002
|
+
return v1;
|
|
1003
|
+
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Convert the PhotonImage to raw bytes. Returns a JPEG.
|
|
1006
|
+
* @param {number} quality
|
|
1007
|
+
* @returns {Uint8Array}
|
|
1008
|
+
*/
|
|
1009
|
+
get_bytes_jpeg(quality) {
|
|
1010
|
+
const ret = wasm.photonimage_get_bytes_jpeg(this.__wbg_ptr, quality);
|
|
1011
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1012
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1013
|
+
return v1;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Convert the PhotonImage to raw bytes. Returns a WEBP.
|
|
1017
|
+
* @returns {Uint8Array}
|
|
1018
|
+
*/
|
|
1019
|
+
get_bytes_webp() {
|
|
1020
|
+
const ret = wasm.photonimage_get_bytes_webp(this.__wbg_ptr);
|
|
1021
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1022
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1023
|
+
return v1;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Convert the PhotonImage's raw pixels to JS-compatible ImageData.
|
|
1027
|
+
* @returns {ImageData}
|
|
1028
|
+
*/
|
|
1029
|
+
get_image_data() {
|
|
1030
|
+
const ret = wasm.photonimage_get_image_data(this.__wbg_ptr);
|
|
1031
|
+
return ret;
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Convert ImageData to raw pixels, and update the PhotonImage's raw pixels to this.
|
|
1035
|
+
* @param {ImageData} img_data
|
|
1036
|
+
*/
|
|
1037
|
+
set_imgdata(img_data) {
|
|
1038
|
+
wasm.photonimage_set_imgdata(this.__wbg_ptr, img_data);
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Calculates estimated filesize and returns number of bytes
|
|
1042
|
+
* @returns {bigint}
|
|
1043
|
+
*/
|
|
1044
|
+
get_estimated_filesize() {
|
|
1045
|
+
const ret = wasm.photonimage_get_estimated_filesize(this.__wbg_ptr);
|
|
1046
|
+
return BigInt.asUintN(64, ret);
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
module.exports.PhotonImage = PhotonImage;
|
|
1050
|
+
var RgbFinalization = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
|
|
1051
|
+
}, "register"), unregister: /* @__PURE__ */ __name(() => {
|
|
1052
|
+
}, "unregister") } : new FinalizationRegistry((ptr) => wasm.__wbg_rgb_free(ptr >>> 0, 1));
|
|
1053
|
+
var Rgb = class {
|
|
1054
|
+
static {
|
|
1055
|
+
__name(this, "Rgb");
|
|
1056
|
+
}
|
|
1057
|
+
__destroy_into_raw() {
|
|
1058
|
+
const ptr = this.__wbg_ptr;
|
|
1059
|
+
this.__wbg_ptr = 0;
|
|
1060
|
+
RgbFinalization.unregister(this);
|
|
1061
|
+
return ptr;
|
|
1062
|
+
}
|
|
1063
|
+
free() {
|
|
1064
|
+
const ptr = this.__destroy_into_raw();
|
|
1065
|
+
wasm.__wbg_rgb_free(ptr, 0);
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Create a new RGB struct.
|
|
1069
|
+
* @param {number} r
|
|
1070
|
+
* @param {number} g
|
|
1071
|
+
* @param {number} b
|
|
1072
|
+
*/
|
|
1073
|
+
constructor(r, g, b) {
|
|
1074
|
+
const ret = wasm.rgb_new(r, g, b);
|
|
1075
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1076
|
+
RgbFinalization.register(this, this.__wbg_ptr, this);
|
|
1077
|
+
return this;
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Set the Red value.
|
|
1081
|
+
* @param {number} r
|
|
1082
|
+
*/
|
|
1083
|
+
set_red(r) {
|
|
1084
|
+
wasm.rgb_set_red(this.__wbg_ptr, r);
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Get the Green value.
|
|
1088
|
+
* @param {number} g
|
|
1089
|
+
*/
|
|
1090
|
+
set_green(g) {
|
|
1091
|
+
wasm.rgb_set_green(this.__wbg_ptr, g);
|
|
1092
|
+
}
|
|
1093
|
+
/**
|
|
1094
|
+
* Set the Blue value.
|
|
1095
|
+
* @param {number} b
|
|
1096
|
+
*/
|
|
1097
|
+
set_blue(b) {
|
|
1098
|
+
wasm.rgb_set_blue(this.__wbg_ptr, b);
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Get the Red value.
|
|
1102
|
+
* @returns {number}
|
|
1103
|
+
*/
|
|
1104
|
+
get_red() {
|
|
1105
|
+
const ret = wasm.rgb_get_red(this.__wbg_ptr);
|
|
1106
|
+
return ret;
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* Get the Green value.
|
|
1110
|
+
* @returns {number}
|
|
1111
|
+
*/
|
|
1112
|
+
get_green() {
|
|
1113
|
+
const ret = wasm.rgb_get_green(this.__wbg_ptr);
|
|
1114
|
+
return ret;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Get the Blue value.
|
|
1118
|
+
* @returns {number}
|
|
1119
|
+
*/
|
|
1120
|
+
get_blue() {
|
|
1121
|
+
const ret = wasm.rgb_get_blue(this.__wbg_ptr);
|
|
1122
|
+
return ret;
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
module.exports.Rgb = Rgb;
|
|
1126
|
+
var RgbaFinalization = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
|
|
1127
|
+
}, "register"), unregister: /* @__PURE__ */ __name(() => {
|
|
1128
|
+
}, "unregister") } : new FinalizationRegistry((ptr) => wasm.__wbg_rgba_free(ptr >>> 0, 1));
|
|
1129
|
+
var Rgba = class {
|
|
1130
|
+
static {
|
|
1131
|
+
__name(this, "Rgba");
|
|
1132
|
+
}
|
|
1133
|
+
__destroy_into_raw() {
|
|
1134
|
+
const ptr = this.__wbg_ptr;
|
|
1135
|
+
this.__wbg_ptr = 0;
|
|
1136
|
+
RgbaFinalization.unregister(this);
|
|
1137
|
+
return ptr;
|
|
1138
|
+
}
|
|
1139
|
+
free() {
|
|
1140
|
+
const ptr = this.__destroy_into_raw();
|
|
1141
|
+
wasm.__wbg_rgba_free(ptr, 0);
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* Create a new RGBA struct.
|
|
1145
|
+
* @param {number} r
|
|
1146
|
+
* @param {number} g
|
|
1147
|
+
* @param {number} b
|
|
1148
|
+
* @param {number} a
|
|
1149
|
+
*/
|
|
1150
|
+
constructor(r, g, b, a) {
|
|
1151
|
+
const ret = wasm.rgba_new(r, g, b, a);
|
|
1152
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1153
|
+
RgbaFinalization.register(this, this.__wbg_ptr, this);
|
|
1154
|
+
return this;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Set the Red value.
|
|
1158
|
+
* @param {number} r
|
|
1159
|
+
*/
|
|
1160
|
+
set_red(r) {
|
|
1161
|
+
wasm.rgb_set_red(this.__wbg_ptr, r);
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* Get the Green value.
|
|
1165
|
+
* @param {number} g
|
|
1166
|
+
*/
|
|
1167
|
+
set_green(g) {
|
|
1168
|
+
wasm.rgb_set_green(this.__wbg_ptr, g);
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* Set the Blue value.
|
|
1172
|
+
* @param {number} b
|
|
1173
|
+
*/
|
|
1174
|
+
set_blue(b) {
|
|
1175
|
+
wasm.rgb_set_blue(this.__wbg_ptr, b);
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Set the alpha value.
|
|
1179
|
+
* @param {number} a
|
|
1180
|
+
*/
|
|
1181
|
+
set_alpha(a) {
|
|
1182
|
+
wasm.rgba_set_alpha(this.__wbg_ptr, a);
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Get the Red value.
|
|
1186
|
+
* @returns {number}
|
|
1187
|
+
*/
|
|
1188
|
+
get_red() {
|
|
1189
|
+
const ret = wasm.rgb_get_red(this.__wbg_ptr);
|
|
1190
|
+
return ret;
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* Get the Green value.
|
|
1194
|
+
* @returns {number}
|
|
1195
|
+
*/
|
|
1196
|
+
get_green() {
|
|
1197
|
+
const ret = wasm.rgb_get_green(this.__wbg_ptr);
|
|
1198
|
+
return ret;
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Get the Blue value.
|
|
1202
|
+
* @returns {number}
|
|
1203
|
+
*/
|
|
1204
|
+
get_blue() {
|
|
1205
|
+
const ret = wasm.rgb_get_blue(this.__wbg_ptr);
|
|
1206
|
+
return ret;
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Get the alpha value for this color.
|
|
1210
|
+
* @returns {number}
|
|
1211
|
+
*/
|
|
1212
|
+
get_alpha() {
|
|
1213
|
+
const ret = wasm.rgba_get_alpha(this.__wbg_ptr);
|
|
1214
|
+
return ret;
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
module.exports.Rgba = Rgba;
|
|
1218
|
+
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
1219
|
+
const ret = new Error();
|
|
1220
|
+
return ret;
|
|
1221
|
+
};
|
|
1222
|
+
module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
1223
|
+
const ret = arg1.stack;
|
|
1224
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1225
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1226
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1227
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1228
|
+
};
|
|
1229
|
+
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
1230
|
+
let deferred0_0;
|
|
1231
|
+
let deferred0_1;
|
|
1232
|
+
try {
|
|
1233
|
+
deferred0_0 = arg0;
|
|
1234
|
+
deferred0_1 = arg1;
|
|
1235
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1236
|
+
} finally {
|
|
1237
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
module.exports.__wbg_instanceof_Window_c4b70662a0d2c5ec = function(arg0) {
|
|
1241
|
+
let result;
|
|
1242
|
+
try {
|
|
1243
|
+
result = arg0 instanceof Window;
|
|
1244
|
+
} catch (_) {
|
|
1245
|
+
result = false;
|
|
1246
|
+
}
|
|
1247
|
+
const ret = result;
|
|
1248
|
+
return ret;
|
|
1249
|
+
};
|
|
1250
|
+
module.exports.__wbg_document_e5c1786dea6542e4 = function(arg0) {
|
|
1251
|
+
const ret = arg0.document;
|
|
1252
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1253
|
+
};
|
|
1254
|
+
module.exports.__wbg_body_e70ae6abd01ae584 = function(arg0) {
|
|
1255
|
+
const ret = arg0.body;
|
|
1256
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1257
|
+
};
|
|
1258
|
+
module.exports.__wbg_createElement_5d4c76f218b78145 = function() {
|
|
1259
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1260
|
+
const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
|
|
1261
|
+
return ret;
|
|
1262
|
+
}, arguments);
|
|
1263
|
+
};
|
|
1264
|
+
module.exports.__wbg_width_4c6f0048d64cf86b = function(arg0) {
|
|
1265
|
+
const ret = arg0.width;
|
|
1266
|
+
return ret;
|
|
1267
|
+
};
|
|
1268
|
+
module.exports.__wbg_height_21f0d3fd8f753394 = function(arg0) {
|
|
1269
|
+
const ret = arg0.height;
|
|
1270
|
+
return ret;
|
|
1271
|
+
};
|
|
1272
|
+
module.exports.__wbg_width_79e0847ed5883b03 = function(arg0) {
|
|
1273
|
+
const ret = arg0.width;
|
|
1274
|
+
return ret;
|
|
1275
|
+
};
|
|
1276
|
+
module.exports.__wbg_height_e4e4e4779f8feac0 = function(arg0) {
|
|
1277
|
+
const ret = arg0.height;
|
|
1278
|
+
return ret;
|
|
1279
|
+
};
|
|
1280
|
+
module.exports.__wbg_data_fda507064d127f5b = function(arg0, arg1) {
|
|
1281
|
+
const ret = arg1.data;
|
|
1282
|
+
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
1283
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1284
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1285
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1286
|
+
};
|
|
1287
|
+
module.exports.__wbg_newwithu8clampedarrayandsh_1fddccb3a94a5e05 = function() {
|
|
1288
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1289
|
+
const ret = new ImageData(getClampedArrayU8FromWasm0(arg0, arg1), arg2 >>> 0, arg3 >>> 0);
|
|
1290
|
+
return ret;
|
|
1291
|
+
}, arguments);
|
|
1292
|
+
};
|
|
1293
|
+
module.exports.__wbg_instanceof_CanvasRenderingContext2d_3abbe7ec7af32cae = function(arg0) {
|
|
1294
|
+
let result;
|
|
1295
|
+
try {
|
|
1296
|
+
result = arg0 instanceof CanvasRenderingContext2D;
|
|
1297
|
+
} catch (_) {
|
|
1298
|
+
result = false;
|
|
1299
|
+
}
|
|
1300
|
+
const ret = result;
|
|
1301
|
+
return ret;
|
|
1302
|
+
};
|
|
1303
|
+
module.exports.__wbg_drawImage_fede06db74e39a60 = function() {
|
|
1304
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1305
|
+
arg0.drawImage(arg1, arg2, arg3);
|
|
1306
|
+
}, arguments);
|
|
1307
|
+
};
|
|
1308
|
+
module.exports.__wbg_drawImage_f395c8e43c79a909 = function() {
|
|
1309
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
|
|
1310
|
+
arg0.drawImage(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
|
|
1311
|
+
}, arguments);
|
|
1312
|
+
};
|
|
1313
|
+
module.exports.__wbg_getImageData_5e1c242046e6b59e = function() {
|
|
1314
|
+
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
1315
|
+
const ret = arg0.getImageData(arg1, arg2, arg3, arg4);
|
|
1316
|
+
return ret;
|
|
1317
|
+
}, arguments);
|
|
1318
|
+
};
|
|
1319
|
+
module.exports.__wbg_putImageData_a8b3e177ee06d521 = function() {
|
|
1320
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
1321
|
+
arg0.putImageData(arg1, arg2, arg3);
|
|
1322
|
+
}, arguments);
|
|
1323
|
+
};
|
|
1324
|
+
module.exports.__wbg_instanceof_HtmlCanvasElement_25d964a0dde6717e = function(arg0) {
|
|
1325
|
+
let result;
|
|
1326
|
+
try {
|
|
1327
|
+
result = arg0 instanceof HTMLCanvasElement;
|
|
1328
|
+
} catch (_) {
|
|
1329
|
+
result = false;
|
|
1330
|
+
}
|
|
1331
|
+
const ret = result;
|
|
1332
|
+
return ret;
|
|
1333
|
+
};
|
|
1334
|
+
module.exports.__wbg_width_dc225e55343b745e = function(arg0) {
|
|
1335
|
+
const ret = arg0.width;
|
|
1336
|
+
return ret;
|
|
1337
|
+
};
|
|
1338
|
+
module.exports.__wbg_setwidth_488780db69b08846 = function(arg0, arg1) {
|
|
1339
|
+
arg0.width = arg1 >>> 0;
|
|
1340
|
+
};
|
|
1341
|
+
module.exports.__wbg_height_3a8bec2f3fe71b26 = function(arg0) {
|
|
1342
|
+
const ret = arg0.height;
|
|
1343
|
+
return ret;
|
|
1344
|
+
};
|
|
1345
|
+
module.exports.__wbg_setheight_1761808c18403921 = function(arg0, arg1) {
|
|
1346
|
+
arg0.height = arg1 >>> 0;
|
|
1347
|
+
};
|
|
1348
|
+
module.exports.__wbg_getContext_fc99dbd3a9a7e318 = function() {
|
|
1349
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
1350
|
+
const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
|
|
1351
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1352
|
+
}, arguments);
|
|
1353
|
+
};
|
|
1354
|
+
module.exports.__wbg_settextContent_f82a86a8df347e1c = function(arg0, arg1, arg2) {
|
|
1355
|
+
arg0.textContent = arg1 === 0 ? void 0 : getStringFromWasm0(arg1, arg2);
|
|
1356
|
+
};
|
|
1357
|
+
module.exports.__wbg_appendChild_fa3b00dade9fc4cf = function() {
|
|
1358
|
+
return handleError(function(arg0, arg1) {
|
|
1359
|
+
const ret = arg0.appendChild(arg1);
|
|
1360
|
+
return ret;
|
|
1361
|
+
}, arguments);
|
|
1362
|
+
};
|
|
1363
|
+
module.exports.__wbg_newnoargs_e643855c6572a4a8 = function(arg0, arg1) {
|
|
1364
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1365
|
+
return ret;
|
|
1366
|
+
};
|
|
1367
|
+
module.exports.__wbg_call_f96b398515635514 = function() {
|
|
1368
|
+
return handleError(function(arg0, arg1) {
|
|
1369
|
+
const ret = arg0.call(arg1);
|
|
1370
|
+
return ret;
|
|
1371
|
+
}, arguments);
|
|
1372
|
+
};
|
|
1373
|
+
module.exports.__wbg_self_b9aad7f1c618bfaf = function() {
|
|
1374
|
+
return handleError(function() {
|
|
1375
|
+
const ret = self.self;
|
|
1376
|
+
return ret;
|
|
1377
|
+
}, arguments);
|
|
1378
|
+
};
|
|
1379
|
+
module.exports.__wbg_window_55e469842c98b086 = function() {
|
|
1380
|
+
return handleError(function() {
|
|
1381
|
+
const ret = window.window;
|
|
1382
|
+
return ret;
|
|
1383
|
+
}, arguments);
|
|
1384
|
+
};
|
|
1385
|
+
module.exports.__wbg_globalThis_d0957e302752547e = function() {
|
|
1386
|
+
return handleError(function() {
|
|
1387
|
+
const ret = globalThis.globalThis;
|
|
1388
|
+
return ret;
|
|
1389
|
+
}, arguments);
|
|
1390
|
+
};
|
|
1391
|
+
module.exports.__wbg_global_ae2f87312b8987fb = function() {
|
|
1392
|
+
return handleError(function() {
|
|
1393
|
+
const ret = global.global;
|
|
1394
|
+
return ret;
|
|
1395
|
+
}, arguments);
|
|
1396
|
+
};
|
|
1397
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
1398
|
+
const ret = arg0 === void 0;
|
|
1399
|
+
return ret;
|
|
1400
|
+
};
|
|
1401
|
+
module.exports.__wbg_buffer_fcbfb6d88b2732e9 = function(arg0) {
|
|
1402
|
+
const ret = arg0.buffer;
|
|
1403
|
+
return ret;
|
|
1404
|
+
};
|
|
1405
|
+
module.exports.__wbg_new_bc5d9aad3f9ac80e = function(arg0) {
|
|
1406
|
+
const ret = new Uint8Array(arg0);
|
|
1407
|
+
return ret;
|
|
1408
|
+
};
|
|
1409
|
+
module.exports.__wbg_set_4b3aa8445ac1e91c = function(arg0, arg1, arg2) {
|
|
1410
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
1411
|
+
};
|
|
1412
|
+
module.exports.__wbg_length_d9c4ded7e708c6a1 = function(arg0) {
|
|
1413
|
+
const ret = arg0.length;
|
|
1414
|
+
return ret;
|
|
1415
|
+
};
|
|
1416
|
+
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1417
|
+
const ret = debugString(arg1);
|
|
1418
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1419
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1420
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1421
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1422
|
+
};
|
|
1423
|
+
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
1424
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1425
|
+
};
|
|
1426
|
+
module.exports.__wbindgen_memory = function() {
|
|
1427
|
+
const ret = wasm.memory;
|
|
1428
|
+
return ret;
|
|
1429
|
+
};
|
|
1430
|
+
module.exports.__wbindgen_init_externref_table = function() {
|
|
1431
|
+
const table = wasm.__wbindgen_export_2;
|
|
1432
|
+
const offset = table.grow(4);
|
|
1433
|
+
table.set(0, void 0);
|
|
1434
|
+
table.set(offset + 0, void 0);
|
|
1435
|
+
table.set(offset + 1, null);
|
|
1436
|
+
table.set(offset + 2, true);
|
|
1437
|
+
table.set(offset + 3, false);
|
|
1438
|
+
;
|
|
1439
|
+
};
|
|
1440
|
+
var path = __require("path").join(__dirname, "photon_rs_bg.wasm");
|
|
1441
|
+
var bytes = __require("fs").readFileSync(path);
|
|
1442
|
+
var wasmModule = new WebAssembly.Module(bytes);
|
|
1443
|
+
var wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
1444
|
+
wasm = wasmInstance.exports;
|
|
1445
|
+
module.exports.__wasm = wasm;
|
|
1446
|
+
wasm.__wbindgen_start();
|
|
1447
|
+
}
|
|
1448
|
+
});
|
|
1449
|
+
export default require_photon_rs();
|